Skip to content
This repository has been archived by the owner on Jun 12, 2022. It is now read-only.

Commit

Permalink
fix(agent): accept Request as fetch input, not just strings
Browse files Browse the repository at this point in the history
  • Loading branch information
zkat committed Apr 9, 2017
1 parent 05ae83b commit b71669a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ let AGENT_CACHE = new LRU({
let HttpsAgent
let HttpAgent
function getAgent (uri, opts) {
const parsedUri = url.parse(uri)
const parsedUri = url.parse(typeof uri === 'string' ? uri : uri.url)
const isHttps = parsedUri.protocol === 'https:'
const pxuri = getProxyUri(uri, opts)
const key = [
Expand Down

0 comments on commit b71669a

Please sign in to comment.