@jayfong/x-request 2.83.0 → 2.84.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.
- package/lib/_cjs/index.js +3 -0
- package/lib/index.d.ts +4 -0
- package/lib/index.js +3 -0
- package/package.json +1 -1
package/lib/_cjs/index.js
CHANGED
|
@@ -137,6 +137,9 @@ class XRequest {
|
|
|
137
137
|
if (referer && !referer.startsWith('http:') && !referer.startsWith('https:')) {
|
|
138
138
|
gotOptions.headers.referer = new URL(String(gotOptions.headers.referer), options.baseUrl || options.url).toString();
|
|
139
139
|
}
|
|
140
|
+
if (options.gotOptions) {
|
|
141
|
+
Object.assign(gotOptions, options.gotOptions);
|
|
142
|
+
}
|
|
140
143
|
return gotOptions;
|
|
141
144
|
}
|
|
142
145
|
static afterResponse(options, responseType, res) {
|
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -128,6 +128,9 @@ export class XRequest {
|
|
|
128
128
|
if (referer && !referer.startsWith('http:') && !referer.startsWith('https:')) {
|
|
129
129
|
gotOptions.headers.referer = new URL(String(gotOptions.headers.referer), options.baseUrl || options.url).toString();
|
|
130
130
|
}
|
|
131
|
+
if (options.gotOptions) {
|
|
132
|
+
Object.assign(gotOptions, options.gotOptions);
|
|
133
|
+
}
|
|
131
134
|
return gotOptions;
|
|
132
135
|
}
|
|
133
136
|
static afterResponse(options, responseType, res) {
|