Skip to content
This repository was archived by the owner on Aug 20, 2020. It is now read-only.

Commit 1a5de60

Browse files
committed
When calling client.API, allow for optional port to be assigned in endpointRequest 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).
1 parent 4e6fa6a commit 1a5de60

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/client.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ function Client (globalRequest) {
5858
request.host = endpointRequest.host || globalRequest.host
5959
request.method = endpointRequest.method
6060

61+
if (endpointRequest.port) {
62+
request.port = endpointRequest.port
63+
}
64+
6165
// build URL
6266
request.path = !isEmpty(endpointRequest.queryParams)
6367
? buildPath(endpointRequest.path, endpointRequest.queryParams)

0 commit comments

Comments
 (0)