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

fix: do not override content-type if its given #158

Merged
merged 2 commits into from
Aug 26, 2019

Conversation

alexander-fenster
Copy link
Contributor

Fixes #156 by forcing the Content-Type header only it's not set in options. It should work then because the header is set in https://github.com/googleapis/nodejs-googleapis-common/blob/8734154a219c3a2bf865dc830bc95fbb5a640794/src/apirequest.ts#L210 and should be just passed down all the way.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Aug 26, 2019
Copy link
Contributor

@bcoe bcoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 looks reasonable to me; imagine we'll want to be careful when rolling this out to libraries, but seems like the right change.

@codecov
Copy link

codecov bot commented Aug 26, 2019

Codecov Report

Merging #158 into master will increase coverage by 0.03%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #158      +/-   ##
==========================================
+ Coverage   96.55%   96.58%   +0.03%     
==========================================
  Files           4        4              
  Lines         580      586       +6     
  Branches       98      100       +2     
==========================================
+ Hits          560      566       +6     
  Misses         19       19              
  Partials        1        1
Impacted Files Coverage Δ
src/gaxios.ts 93.48% <100%> (+0.15%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5182075...7747707. Read the comment docs.

@alexander-fenster alexander-fenster merged commit f49e0e6 into master Aug 26, 2019
@alexander-fenster alexander-fenster deleted the object-header-override branch August 26, 2019 22:09
@alexander-fenster
Copy link
Contributor Author

Let's wait for @JustinBeckwith to release this, just to have one more pair of 👀 checking the logic.

This was referenced Aug 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Forced 'Content-Type' header
3 participants