Skip to content

Commit

Permalink
When calling client.API, allow for optional port to be assigned in en…
Browse files Browse the repository at this point in the history
…dpointRequest which is then used in the buildrequest.

This is to allow for environments that sit behind corporate firewalls or proxies that have strict environments were HTTPs request must have port 443 assigned during request (unlike the current default request which is empty).
  • Loading branch information
apat183 committed Jul 14, 2017
1 parent 4e6fa6a commit 1a5de60
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ function Client (globalRequest) {
request.host = endpointRequest.host || globalRequest.host
request.method = endpointRequest.method

if (endpointRequest.port) {
request.port = endpointRequest.port
}

// build URL
request.path = !isEmpty(endpointRequest.queryParams)
? buildPath(endpointRequest.path, endpointRequest.queryParams)
Expand Down

0 comments on commit 1a5de60

Please sign in to comment.