[JS] HttpClient: Cannot read property 'forEach' of undefined
Added check in `HttpClient`'s `send` function to check for headers object in `httpRequest` object
@@ -102,9 +102,12 @@ class HttpClient {
let data;
let headers = {};
+
+ if (httpRequest.headers) {
httpRequest.headers.forEach(function(value, name) {
headers[name] = value;
});
+ }
headers['User-Agent'] = USER_AGENT;
headers['Content-Length'] = 0;
