Support proxying through a proxy - #37

Automatically respects proxy headers from environment variables,
using https://github.com/Rob--W/proxy-from-env
This commit is contained in:
Rob Wu
2016-02-19 00:22:20 +01:00
parent 440d2de180
commit 8568c06b17
5 changed files with 113 additions and 7 deletions

View File

@@ -93,6 +93,12 @@ nock('http://example.com')
.replyWithError('throw node')
;
nock('https://example.com')
.persist()
.get('/')
.reply(200, 'Response from https://example.com')
;
echoheaders('http://example.com');
echoheaders('http://example.com:1337');
echoheaders('https://example.com');