Expose cgiRequestMethod variable for convenience #419

Closed
aliaspooryorik opened this Issue Jan 19, 2016 · 1 comment

Comments

Projects
None yet
2 participants
@aliaspooryorik
Contributor

aliaspooryorik commented Jan 19, 2016

A small suggestion for an enhancement although it is easy to access the information by other means.

Internally FW/1 stores the CGI.REQUEST_METHOD as cgiRequestMethod. As this key is already in FW/1 it could be made available via a method so that controllers could access it (something like variables.fw.getRequestMethod()).

My use case for this was that I had a request coming in which was being handled by the controller queued from setupRequest. I wanted to know the http verb so that I could check for a CSRF token for POST / DELETE / PUT requests.

@seancorfield

This comment has been minimized.

Show comment
Hide comment
@seancorfield

seancorfield Jan 20, 2016

Member

Yes, this seems like a very reasonable enhancement. I'll add getCGIRequestMethod().

Member

seancorfield commented Jan 20, 2016

Yes, this seems like a very reasonable enhancement. I'll add getCGIRequestMethod().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment