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: populate GaxiosResponse with raw response information (res.url) #189

Merged
merged 5 commits into from
Nov 25, 2019

Conversation

marapper
Copy link
Contributor

To resolve #187

Adding request.responseUrl with real URL after redirects to response.

await axios.get('/redirect')

{
 config: {
   url: '/redirect',
   ...
 },
 request: {
   responseURL: 'https://example.com/real_page',
 }
}

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@googlebot googlebot added the cla: no This human has *not* signed the Contributor License Agreement. label Nov 19, 2019
@marapper
Copy link
Contributor Author

@googlebot I signed it!

@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@googlebot googlebot added cla: yes This human has signed the Contributor License Agreement. and removed cla: no This human has *not* signed the Contributor License Agreement. labels Nov 19, 2019
@bcoe
Copy link
Contributor

bcoe commented Nov 19, 2019

@marapper don't worry about the license header, not your issue; thanks for the patch.

@bcoe bcoe added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Nov 22, 2019
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Nov 22, 2019
@codecov
Copy link

codecov bot commented Nov 22, 2019

Codecov Report

Merging #189 into master will increase coverage by 0.05%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #189      +/-   ##
==========================================
+ Coverage   96.59%   96.64%   +0.05%     
==========================================
  Files           4        4              
  Lines         587      597      +10     
  Branches      100      100              
==========================================
+ Hits          567      577      +10     
  Misses         19       19              
  Partials        1        1
Impacted Files Coverage Δ
src/gaxios.ts 93.46% <100%> (+0.12%) ⬆️
src/common.ts 100% <100%> (ø) ⬆️

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 ba9777b...2d82b21. Read the comment docs.

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.

one thing jumps out at me in final review, why populate status and statusText twice, if we already have them on the top level object?

@marapper
Copy link
Contributor Author

marapper commented Nov 23, 2019

Yes, I just forgot to remove it. In axios it is populating twice but I think it's redundant.

Updated.

@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

@googlebot googlebot added cla: no This human has *not* signed the Contributor License Agreement. and removed cla: yes This human has signed the Contributor License Agreement. labels Nov 23, 2019
@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@googlebot googlebot added cla: yes This human has signed the Contributor License Agreement. and removed cla: no This human has *not* signed the Contributor License Agreement. labels Nov 23, 2019
@bcoe bcoe changed the title feat: Real request information in response object feat: populate GaxiosResponse with raw response information Nov 25, 2019
@bcoe bcoe changed the title feat: populate GaxiosResponse with raw response information feat: populate GaxiosResponse with raw response information (res.url). Nov 25, 2019
@bcoe bcoe changed the title feat: populate GaxiosResponse with raw response information (res.url). feat: populate GaxiosResponse with raw response information (res.url) Nov 25, 2019
@bcoe bcoe added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Nov 25, 2019
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Nov 25, 2019
@bcoe bcoe added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Nov 25, 2019
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Nov 25, 2019
@bcoe bcoe merged commit 53a7f54 into googleapis:master Nov 25, 2019
@bcoe
Copy link
Contributor

bcoe commented Nov 25, 2019

@marapper thank you for the contribution \o/ this will be released shortly after the holidays.

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.

Real request information in response object
4 participants