node-rest-client
Advanced tools
Comparing version 1.5.0 to 1.5.1
@@ -191,6 +191,7 @@ var http = require('http'), | ||
var options = this.createConnectOptions(this.parsePathParameters(args,url), method); | ||
debug("options pre connect",options); | ||
options.method = method, | ||
options.clientRequest = clientRequest; | ||
options.headers={}; | ||
debug("options pre connect",options); | ||
options.clientRequest = clientRequest, | ||
options.headers= options.headers || {}; | ||
debug("args = ", args); | ||
@@ -207,4 +208,9 @@ debug("args.data = ", args !== undefined?args.data:undefined); | ||
// add headers and POST/PUT/DELETE/PATCH data to connect options to be passed | ||
// with request | ||
if (args.headers)options.headers = args.headers; | ||
// with request, but without deleting other headers like non-tunnel proxy headers | ||
if (args.headers){ | ||
for (var headerName in args.headers){ | ||
options.headers[headerName] = args.headers[headerName]; | ||
} | ||
} | ||
@@ -232,3 +238,3 @@ //always set Content-length header | ||
debug("options post connect",options); | ||
debug("FINAL SELF object ====>", self); | ||
@@ -235,0 +241,0 @@ |
@@ -5,3 +5,3 @@ { | ||
"description": "node API REST client", | ||
"version": "1.5.0", | ||
"version": "1.5.1", | ||
"repository": { | ||
@@ -8,0 +8,0 @@ "type":"git", |
42519
707