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: add support for baseUrl in options #19

Merged
merged 1 commit into from
Jan 12, 2019
Merged

feat: add support for baseUrl in options #19

merged 1 commit into from
Jan 12, 2019

Conversation

JustinBeckwith
Copy link
Contributor

The GaxiosOptions object now supports a baseUrl property that can be used to set the base url for a request. This is especially useful when using a single instance, and making many requests to the same domain:

const gaxios = require('gaxios');
gaxios.instance.defaults.baseUrl = 'https://example.com';
gaxios.request({ url: '/data' }).then(...);

@codecov
Copy link

codecov bot commented Jan 12, 2019

Codecov Report

Merging #19 into master will increase coverage by 0.12%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #19      +/-   ##
==========================================
+ Coverage    90.6%   90.72%   +0.12%     
==========================================
  Files           4        4              
  Lines         149      151       +2     
  Branches       51       52       +1     
==========================================
+ Hits          135      137       +2     
  Misses         14       14
Impacted Files Coverage Δ
src/common.ts 100% <ø> (ø) ⬆️
src/gaxios.ts 83.13% <100%> (+0.41%) ⬆️

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 1872835...0eab2c1. Read the comment docs.

@JustinBeckwith JustinBeckwith merged commit 032fa66 into master Jan 12, 2019
@JustinBeckwith
Copy link
Contributor Author

🎉 This PR is included in version 1.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@lock
Copy link

lock bot commented Mar 6, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Mar 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant