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.

multipart/form-data endpoint doesn't seem to have correct content-type

See original GitHub issue

What are the steps to reproduce this issue?

  1. Generating a react-query query on an endpoint that expects multipart/form-data

What happens?

The request that gets sent uses application/json

What were you expecting to happen?

The request to have multipart/form-data

What versions are you using?

Operating System: macOS 11.4 Package Version: 5.4.9

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:12 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
anymaniaxcommented, Jul 18, 2021

@fr3fou normally it’s automatic if you put that your endpoint is a multipart/form-data and the boolean is only useful if you want to disable the automatic generation of formData

2reactions
sladgcommented, Jul 12, 2021

@anymaniax I confirm that now FormData works as expected. Thanks a lot! We can probably close the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Custom multipart/form-data Content-Type header silently ...
It doesn't seem to me that silently failing to upload any file at all is the correct response here. Even throwing an exception...
Read more >
Request with multipart/form-data returns 415 error
When your controller method consumes MediaType.APPLICATION_OCTET_STREAM_VALUE , it doesn't handle a request with Content-Type: multipart/form- ...
Read more >
REST request with 'content-type: multipart/form-data' header ...
Hello,. We are using API Gateway in our project and are running into a weird issue. We have a virtualized REST API allowing...
Read more >
HTTP POST files with multipart/form-data
We are getting internal server error in HTTP POST request using Content type as “multipart/form-data” for uploading local PDF file. Below are ...
Read more >
Building requests | Postman Learning Center
You can send requests in Postman to connect to APIs you are working with. Your requests can retrieve, add, delete, and update data....
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