Skip to content
This repository has been archived by the owner on Feb 13, 2023. It is now read-only.

🚑️ Inherit content-type from options first #51

Merged
merged 4 commits into from
Dec 27, 2022

Conversation

AlexV525
Copy link
Member

Fix the regression of content-type that is brought from #46.

New Pull Request Checklist

  • I have read the Documentation
  • I have searched for a similar pull request in the project and found none
  • I have updated this branch with the latest main branch to avoid conflicts (via merge from master or rebase)
  • I have added the required tests to prove the fix/feature I'm adding
  • I have updated the documentation (if necessary)
  • I have run the tests without failures

Additional context and info (if any)

The proper order to determine which content-type should be used is:

  1. Options.headers['content-type']
  2. Options.contentType
  3. BaseOptions.contentType
  4. Headers.jsonContentType

And after #46, it's been changed to:

  1. Options.headers['content-type']
  2. Options.contentType
  3. Headers.jsonContentType

Which dropped the content type set in the BaseOptions.

@AlexV525 AlexV525 added s: bug Something isn't working p: diox Targeting `diox` package labels Dec 26, 2022
@AlexV525 AlexV525 force-pushed the fix-not-inherited-content-type branch from a073053 to 4ffa11b Compare December 26, 2022 13:32
@AlexV525 AlexV525 marked this pull request as ready for review December 26, 2022 14:07
@AlexV525 AlexV525 requested a review from a team as a code owner December 26, 2022 14:07
Signed-off-by: Alex Li <github@alexv525.com>
Signed-off-by: Alex Li <github@alexv525.com>
@AlexV525 AlexV525 merged commit 580b08d into main Dec 27, 2022
@AlexV525 AlexV525 deleted the fix-not-inherited-content-type branch December 27, 2022 01:59
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
p: diox Targeting `diox` package s: bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants