Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to overcome limitations of GET? (X-HTTP-Method-Override?) #18

Open
weierophinney opened this issue Dec 31, 2019 · 3 comments
Open

Comments

@weierophinney
Copy link
Contributor

Is there a method in place to overcome GET limitations? For example, browsers/Apache have a maximum character limit on query strings. The ability to send POST but use GET as the overriden method is desired.

Sending a X-HTTP-Method-Override header is the suggested standard that many APIs support. (Google is behind this). I have not found this or any other workaround in Apigility.


Originally posted by @jdukleth at zfcampus/zf-apigility#175

@weierophinney
Copy link
Contributor Author

+1


Originally posted by @jbh at zfcampus/zf-apigility#175 (comment)

@weierophinney
Copy link
Contributor Author

I made a PR for this feature.
I think enabling this listener should be optional, feels not good to connect such a feature by default to the application so I connected the listener depending on a x_http_method_override_enabled key in the config.

Not sure exactly on what is a valid priority value for this listener. I would say as early as possible, currently set to -40 to be triggered before all other zf-campus onRoute listeners, but might earlier might be even better. I added a TODO to check this value...


Originally posted by @Wilt at zfcampus/zf-apigility#175 (comment)

@weierophinney
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant