unleash-client
Advanced tools
Comparing version 2.2.0 to 2.2.1
@@ -69,3 +69,3 @@ "use strict"; | ||
if (!(res.statusCode && res.statusCode >= 200 && res.statusCode < 300)) { | ||
_this.emit('warn', url + " returning " + res.statusCode); | ||
_this.emit('warn', url + " returning " + res.statusCode, body); | ||
return; | ||
@@ -106,3 +106,3 @@ } | ||
if (!(res.statusCode && res.statusCode >= 200 && res.statusCode < 300)) { | ||
_this.emit('warn', url + " returning " + res.statusCode); | ||
_this.emit('warn', url + " returning " + res.statusCode, body); | ||
return; | ||
@@ -109,0 +109,0 @@ } |
@@ -16,7 +16,7 @@ /// <reference types="request" /> | ||
export interface PostRequestOptions extends RequestOptions { | ||
json?: Data; | ||
json: Data; | ||
appName?: string; | ||
instanceId?: string; | ||
} | ||
export declare const post: ({url, appName, timeout, instanceId}: PostRequestOptions, cb: any) => request.Request; | ||
export declare const post: ({url, appName, timeout, instanceId, json}: PostRequestOptions, cb: any) => request.Request; | ||
export declare const get: ({url, etag, appName, timeout, instanceId}: GetRequestOptions, cb: any) => request.Request; |
@@ -5,3 +5,3 @@ "use strict"; | ||
exports.post = function (_a, cb) { | ||
var url = _a.url, appName = _a.appName, timeout = _a.timeout, instanceId = _a.instanceId; | ||
var url = _a.url, appName = _a.appName, timeout = _a.timeout, instanceId = _a.instanceId, json = _a.json; | ||
var options = { | ||
@@ -14,3 +14,4 @@ url: url, | ||
'User-Agent': appName | ||
} | ||
}, | ||
json: json | ||
}; | ||
@@ -17,0 +18,0 @@ return request.post(options, cb); |
{ | ||
"name": "unleash-client", | ||
"version": "2.2.0", | ||
"version": "2.2.1", | ||
"description": "Unleash Client for Node", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
77808
71
1215