@nxtedition/nxt-undici 7.3.1 → 7.3.2
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/index.d.ts +9 -1
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -11,6 +11,13 @@ export interface URLObject {
|
|
|
11
11
|
search?: string | null
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
+
export interface BodyReadable extends Readable {
|
|
15
|
+
text(): Promise<string>
|
|
16
|
+
json(): Promise<unknown>
|
|
17
|
+
arrayBuffer(): Promise<ArrayBuffer>
|
|
18
|
+
blob(): Promise<Blob>
|
|
19
|
+
}
|
|
20
|
+
|
|
14
21
|
export type URLLike = string | URL | URLObject
|
|
15
22
|
|
|
16
23
|
export interface Dispatcher {
|
|
@@ -67,6 +74,7 @@ export interface DispatchOptions {
|
|
|
67
74
|
bodyTimeout?: number | null
|
|
68
75
|
idempotent?: boolean | null
|
|
69
76
|
typeOfService?: number | null
|
|
77
|
+
dispatcher?: Dispatcher | null
|
|
70
78
|
retry?: RetryOptions | number | boolean | RetryFn | null
|
|
71
79
|
proxy?: ProxyOptions | boolean | null
|
|
72
80
|
cache?: CacheOptions | boolean | null
|
|
@@ -192,7 +200,7 @@ export interface RequestOptions extends DispatchOptions {
|
|
|
192
200
|
export interface ResponseData {
|
|
193
201
|
statusCode: number
|
|
194
202
|
headers: Record<string, string | string[] | undefined>
|
|
195
|
-
body:
|
|
203
|
+
body: BodyReadable
|
|
196
204
|
}
|
|
197
205
|
|
|
198
206
|
export function request(
|