-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(sdk-middleware-http): allow to unset content-type (#1751)
* feat: allow requests with empty content-type * fix: adjust file spaces & format * fix: check null content-type instead of using custom header * fix: refactor the logic to make it more simple * fix: solve failing tests and refactor the way of the checking content-type to be more simple * Create orange-years-rush.md * Create plenty-wasps-refuse.md * debugging middleware http * fix: trying to fix test * fix: removing console log * reverting - debugging middleware http * refactor(sdk-http): allow to unset content-type header * chore: regenerate lockfile * chore: reset yarn.lock with master Co-authored-by: Ajima Chukwuemeka <[email protected]> Co-authored-by: Chukwuemeka Ajima <[email protected]> Co-authored-by: danrleyt <[email protected]> Co-authored-by: Nicola Molinari <[email protected]>
- Loading branch information
1 parent
7c7a3de
commit d392692
Showing
4 changed files
with
222 additions
and
161 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
'@commercetools/sdk-middleware-http': patch | ||
--- | ||
|
||
Allow to unset the `content-type` HTTP header by explicitly passing `null` as the value. | ||
|
||
A use case for that is using `FormData` as the request body, for example to perform a file upload. The browser generally sets the `content-type` HTTP header automatically. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.