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

docs: document proxy behavior and verify with a test #221

Merged
merged 2 commits into from
Dec 28, 2017
Merged

docs: document proxy behavior and verify with a test #221

merged 2 commits into from
Dec 28, 2017

Conversation

JustinBeckwith
Copy link
Contributor

The axios npm module supports setting an HTTP or HTTPS proxy via the http_proxy and https_proxy environment variables. It also happens to be undocumented, which I didn't figure out until writing my own implementation 😂

Here I'm just adding a few tests, and updating our docs. I will follow up with a PR against the axios docs to save others from my fate.

Addresses #65.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Dec 27, 2017
Copy link
Contributor

@ofrobots ofrobots left a comment

Choose a reason for hiding this comment

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

LGTM w/ nits.

const url = 'http://example.com/fake';
const result = await transporter.request({url});
assert.equal(result.status, 200);
process.env['http_proxy'] = undefined;

This comment was marked as spam.

This comment was marked as spam.

@@ -98,4 +98,42 @@ describe('Transporters', () => {
done();
});
});

it('should use the http proxy if one is configured', async () => {

This comment was marked as spam.

This comment was marked as spam.

@JustinBeckwith JustinBeckwith merged commit 8c18fcd into googleapis:next Dec 28, 2017
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.

3 participants