Skip to content
This repository was archived by the owner on Aug 20, 2020. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
When calling client.API, allow for optional port to be assigned in en…
…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
commit 1a5de60976be5d0440290f626e5ef7fb07afb98a
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