@nxtedition/lib 14.1.15 → 14.1.16
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.
- package/package.json +1 -1
- package/undici.js +5 -0
package/package.json
CHANGED
package/undici.js
CHANGED
|
@@ -24,6 +24,7 @@ module.exports.request = async function request(
|
|
|
24
24
|
method = body ? 'POST' : 'GET',
|
|
25
25
|
userAgent,
|
|
26
26
|
headers,
|
|
27
|
+
dump = method === 'HEAD',
|
|
27
28
|
}
|
|
28
29
|
) {
|
|
29
30
|
if (retry === false) {
|
|
@@ -102,6 +103,10 @@ module.exports.request = async function request(
|
|
|
102
103
|
|
|
103
104
|
assert(ures.statusCode >= 200 && ures.statusCode < 300)
|
|
104
105
|
|
|
106
|
+
if (dump) {
|
|
107
|
+
await ures.body.dump()
|
|
108
|
+
}
|
|
109
|
+
|
|
105
110
|
// TODO (fix): Wrap response to handle error that can continue with range request...
|
|
106
111
|
|
|
107
112
|
return ures
|