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

feat(fetch): support form data and form url encoded request #1529

Conversation

soartec-lab
Copy link
Collaborator

Status

READY

Description

follow up #1387
fix #1525

I made the fetch client support cases other than application/json, such as multipart/form-data and application/x-www-form-urlencoded. And, if input OpenAPI have content-type, add Content-Type header to fetch request options.

Related PRs

none

Todos

  • Tests
  • Documentation
  • Changelog Entry (unreleased)

Steps to Test or Reproduce

You can check from the test case I added

@soartec-lab soartec-lab added enhancement New feature or request fetch Fetch client related issue labels Jul 21, 2024
@soartec-lab soartec-lab added this to the 6.32.0 milestone Jul 21, 2024
@melloware melloware merged commit 5585779 into orval-labs:master Jul 21, 2024
2 checks passed
@jamesleeht
Copy link

It seems like there is an issue with this - multipart/form-data content type header should not be set when using fetch:
https://muffinman.io/blog/uploading-files-using-fetch-multipart-form-data/

If not the boundaries will not be properly set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request fetch Fetch client related issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Content-Type header with application/json should be assumed if there is a request body
4 participants