question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't send formData with GET requests.

See original GitHub issue

I’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:closed
  • Created 5 years ago
  • Comments:14 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
javabrettcommented, Sep 13, 2018

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 accept formData.

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 .

0reactions
javabrettcommented, Nov 15, 2018

I’m closing this based on the above discussion and reasoning.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found