xjs-node 3.0.0 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -248,13 +248,7 @@ class HttpResolverContext {
|
|
|
248
248
|
else if (contentEncofing == "br")
|
|
249
249
|
retBuf = zlib.brotliDecompressSync(retBuf);
|
|
250
250
|
const data = rc.responseType === "buffer" ? retBuf : retBuf.toString("utf8");
|
|
251
|
-
|
|
252
|
-
if (xjs_common_1.UType.isString(data) && data.trim())
|
|
253
|
-
this.warn(data);
|
|
254
|
-
reject(new xjs_common_1.XjsErr(s_errCode, `Https received an error status ${res.statusCode}`));
|
|
255
|
-
}
|
|
256
|
-
else
|
|
257
|
-
resolve({ payload: data, headers: res.headers });
|
|
251
|
+
resolve({ payload: data, headers: res.headers, status: res.statusCode });
|
|
258
252
|
}
|
|
259
253
|
catch (e) {
|
|
260
254
|
this.handleError(reject, e, "something went wrong in processing response.");
|