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

Commit f1a3fc5

Browse files
Merge pull request #8 from apat183/master
Ability to optionally assign port for requests when calling client API
2 parents 4e6fa6a + 1a5de60 commit f1a3fc5

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)