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

Unset Content-Type for FormData as request body before Request() constructor call #1550

Merged
merged 3 commits into from
Feb 19, 2024

Conversation

shirish87
Copy link
Contributor

Content-Type header with multipart boundary set by Request() is currently stripped after being set since v0.8.2.

Changes

#1548 Requests with FormData bodies are currently failing since v0.8.2

How to Review

Had to alter test case for Content-Type check in case of FormData body.
Additional test cases covering FormData with a file Blob would help match 'content-type' => 'multipart/form-data; boundary=----formdata-undici-0.6976734701101202'

Checklist

  • Unit tests updated
  • docs/ updated (if necessary)
  • pnpm run update:examples run (only applicable for openapi-typescript)

…t. call. Fixes openapi-ts#1548

content-type header with multipart boundary set by Request() is retained
Copy link

changeset-bot bot commented Feb 17, 2024

🦋 Changeset detected

Latest commit: 40ddad6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
openapi-fetch Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@drwpow
Copy link
Contributor

drwpow commented Feb 17, 2024

Great fix, thank you! If you could add a changeset (patch) I’d be happy to approve & merge

@drwpow
Copy link
Contributor

drwpow commented Feb 17, 2024

Changeset looks perfect. There’s still a linting issue though; be sure to run pnpm run lint and make sure it passes locally

@drwpow drwpow merged commit a5a9cc7 into openapi-ts:main Feb 19, 2024
6 checks passed
@github-actions github-actions bot mentioned this pull request Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants