-
Notifications
You must be signed in to change notification settings - Fork 518
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
Can't send formData with GET requests. #198
Comments
Has anybody noticed this issue? |
@Code-Player can you provide a simple |
https://gist.github.com/code-player/eea29e0be69bd7f0592b9c3e9e753538 |
The error is explicit While I am trying to find a way to configure swagger to be less strict and add it as an option to configure. |
I can send formData even with other modules like
That would be really helpful. |
Note that when moving from Swagger 2.0 to OpenAPI 3.0, the 3.0 specification has tightened-up on this and no-longer permits a
https://swagger.io/docs/specification/describing-request-body/
That means, no more Given OpenAPI 3.0 has deliberately tightened this up, I'd be hesitant to backport support for it for Swagger 2.0. |
Okay, but even RFC 7231 says
So if I'm at the point of designing APIs and need to send some sensitive information to server inside body even for GET request, I am allowed to do that and even basic requesting libraries like CURL, requests(in python) and okhttp(in android) responds well. |
I totally agree that Ergo if you write an API which reads from a You haven't detailed why you must use |
Headers I'm using for Authentication. And I defer to use query-string because data could be logged by any logger which logs the application activity. Also have too much data in query-string also end up with url-too-long error. |
I noticed today that test/demo app http://javabrett.pythonanywhere.com/changelog_090/apidocs/ suffers from this issue, since its Per above, my inclination is to not support this. I suppose it boils down to whether flasgger should allow workarounds at the edges of the Swagger and OpenAPI specifications, or whether it should not attempt to support such things. /cc @rochacbruno . |
Same was the case with me, I have also designed my APIs GET endpoints to accept formData and it was working fine with simple CURL requests or any http(s)-request module in other programming language. |
@javabrett My opinion is that we should support strictly what OpenAPI and Swagger supports, if a workaround is needed then the user is able to do it by monkey patching, inheriting or forking. |
Yeah, sure. |
I'm closing this based on the above discussion and reasoning. |
I'm trying to make a GET request to my api, using
flasgger-ui
. But I get the response:As the endpoint expects a parameter in formBody and data is not parsed properly by flasgger-ui, I get this response.
Another important point is the CURL request command generated at flasgger-ui , if run directly from terminal. Gives the expected results.
And I can even send data in formBody with GET request if I use python
requests
module.I can't figure out whats wrong.
Please explain.
The text was updated successfully, but these errors were encountered: