@warren-bank/node-request
Advanced tools
@@ -70,3 +70,4 @@ const {denodeify} = require('@warren-bank/node-denodeify') | ||
| decoded_data.statusCode = data.statusCode | ||
| decoded_data.headers = data.headers | ||
| decoded_data.headers = {...data.headers} | ||
| delete decoded_data.headers['content-encoding'] // identity | ||
| return decoded_data | ||
@@ -73,0 +74,0 @@ } |
+1
-1
| { | ||
| "name": "@warren-bank/node-request", | ||
| "version": "2.0.16", | ||
| "version": "2.0.17", | ||
| "main": "request.js", | ||
@@ -5,0 +5,0 @@ "description": "An extremely lightweight HTTP request client. Supports: http, https, redirects, cookies, content-encoding, multipart/form-data. Returns: Promise.", |
+8
-0
@@ -134,2 +134,10 @@ ### [request](https://github.com/warren-bank/node-request) | ||
| * no cookie jar is used | ||
| * `keepContentEncoding` {Boolean} (defaults to `false`) | ||
| * `false`: | ||
| * `response` attribute of resolved Promise is decoded | ||
| * the `content-encoding` response header is removed | ||
| * the format of the decoded data is identified by the `content-type` response header | ||
| * `true`: | ||
| * `response` attribute of resolved Promise is encoded, as it was received from the server | ||
| * the method of encoding is identified by the `content-encoding` response header | ||
| * Returns: {Promise} | ||
@@ -136,0 +144,0 @@ * value is resolved to an {Object}: `{url, redirects, response}` |
+4
-2
@@ -54,3 +54,4 @@ const {denodeify, denodeify_net_request} = require('@warren-bank/node-denodeify') | ||
| maxAdditionalCiphers: 5, | ||
| cookieJar: null | ||
| cookieJar: null, | ||
| keepContentEncoding: false | ||
| }, | ||
@@ -223,3 +224,4 @@ opts | ||
| data = await processResponseContentEncoding(data, cb_options) | ||
| if (!config.keepContentEncoding) | ||
| data = await processResponseContentEncoding(data, cb_options) | ||
@@ -226,0 +228,0 @@ if (!is_binary){ |
Network access
Supply chain riskThis module accesses the network.
Found 3 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 3 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
57090
1.13%643
0.47%318
2.58%