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: allow user overrides of content-type and accept #41

Closed
wants to merge 11 commits into from

Conversation

danielroe
Copy link
Member

resolves #40

This PR does three things:

  • it normalizes headers to an object accepting get/set methods (internally), rather than on each get/set call, which should improve performance slightly
  • it exposes a getHeader function in pair to setHeader
  • it allows users to override content-type and accept headers

@danielroe danielroe added the enhancement New feature or request label Dec 21, 2021
@danielroe danielroe requested a review from pi0 December 21, 2021 11:51
@danielroe danielroe self-assigned this Dec 21, 2021
src/fetch.ts Outdated Show resolved Hide resolved
src/fetch.ts Outdated Show resolved Hide resolved
@atinux atinux requested a review from pi0 December 21, 2021 14:32
src/fetch.ts Show resolved Hide resolved
@pi0 pi0 closed this in 4b74e45 Dec 21, 2021
@pi0 pi0 deleted the feat/normalize-headers branch December 21, 2021 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Disable Accept and Content-Type header rewriting if they are already defined
2 participants