Can't send formData with GET requests.
See original GitHub issueI’m trying to make a GET request to my api, using flasgger-ui
. But I get the response:
{
"status": "400 BAD REQUEST",
"type": "error",
"description": {
"name": "Provide valid name."
}
}
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.
Issue Analytics
- State:
- Created 5 years ago
- Comments:14 (3 by maintainers)
Top Results From Across the Web
Send formdata in GET request [duplicate] - Stack Overflow
Closed 2 years ago. i am doing a react project now and there is an api to fetch a list which is a...
Read more >Is it possible to send form data using a GET request? Why or ...
Yes you can sent form data in GET request. But get have some limitations like it will send only few amount of data....
Read more >GET vs POST - Difference and Comparison | Diffen
HTTP POST requests supply additional data from the client (browser) to the server in the message body. In contrast, GET requests include all...
Read more >Building requests - Postman Learning Center
Building requests ; Sending your first request. Additional Resources ; Intro to Postman | Part 1: Send a Request · How to use...
Read more >Can't get a .post with 'Content-Type': 'multipart/form-data' to work
I've spent a few hours today trying to get a post request to work with a few parameters and a file that I...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I noticed today that test/demo app http://javabrett.pythonanywhere.com/changelog_090/apidocs/ suffers from this issue, since its
GET
endpoint is declared to acceptformData
.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 .
I’m closing this based on the above discussion and reasoning.