@dynatrace-sdk/http-client 1.0.3 → 1.0.4
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/CHANGELOG.md +13 -5
- package/cjs/index.js +20 -9
- package/docs/DOCS.md +93 -529
- package/esm/index.js +20 -9
- package/package.json +1 -1
- package/dynatrace-metadata.json +0 -5
package/docs/DOCS.md
CHANGED
|
@@ -1,23 +1,38 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
title: @dynatrace-sdk/http-client
|
|
3
|
+
description:
|
|
4
|
+
---
|
|
2
5
|
|
|
3
|
-
|
|
6
|
+
# @dynatrace-sdk/http-client
|
|
4
7
|
|
|
5
|
-
|
|
6
|
-
npm install @dynatrace-sdk/http-client
|
|
7
|
-
```
|
|
8
|
+
import NpmLogo from '@site/static/img/npm-logo.png';
|
|
8
9
|
|
|
10
|
+
<div class="row margin-bottom--md">
|
|
11
|
+
<div class="col">
|
|
12
|
+
<a href="https://www.npmjs.com/package/@dynatrace-sdk/http-client">
|
|
13
|
+
<span class="margin-right--xs">@dynatrace-sdk/http-client</span>
|
|
14
|
+
<img className="no-zoom" width="20px" src={NpmLogo} />
|
|
15
|
+
</a>
|
|
16
|
+
</div>
|
|
17
|
+
<div class="col" style={{textAlign: 'right'}}>
|
|
18
|
+
<a href="https://www.npmjs.com/package/@dynatrace-sdk/http-client/v/1.0.4">v1.0.4</a>
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
9
21
|
|
|
22
|
+
```bash
|
|
23
|
+
npm install @dynatrace-sdk/http-client
|
|
24
|
+
```
|
|
10
25
|
|
|
11
26
|
## Classes
|
|
12
27
|
|
|
13
|
-
### PlatformBaseError
|
|
14
|
-
<!-- default child "Class" -->
|
|
15
|
-
|
|
28
|
+
### PlatformBaseError
|
|
16
29
|
|
|
30
|
+
<!-- default child "Class" -->
|
|
17
31
|
|
|
18
32
|
#### Constructors
|
|
19
33
|
|
|
20
34
|
##### new PlatformBaseError(message,cause?)
|
|
35
|
+
|
|
21
36
|
<div class="padding-left--md">
|
|
22
37
|
|
|
23
38
|
**Parameters**
|
|
@@ -26,52 +41,34 @@
|
|
|
26
41
|
<strong>message</strong>: <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a>
|
|
27
42
|
<div class="padding-left--md">
|
|
28
43
|
|
|
29
|
-
|
|
30
|
-
|
|
31
44
|
</div>
|
|
32
45
|
|
|
33
|
-
|
|
34
|
-
|
|
35
46
|
</div>
|
|
36
|
-
|
|
37
47
|
<div class="padding-left--md padding-bottom--md">
|
|
38
48
|
<strong>cause</strong>: <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a>
|
|
39
49
|
<div class="padding-left--md">
|
|
40
50
|
|
|
41
|
-
|
|
42
|
-
|
|
43
51
|
</div>
|
|
44
52
|
|
|
45
|
-
|
|
46
|
-
|
|
47
53
|
</div>
|
|
48
54
|
|
|
49
|
-
|
|
50
|
-
|
|
51
55
|
</div>
|
|
52
56
|
|
|
53
|
-
|
|
54
|
-
|
|
55
57
|
#### Properties
|
|
56
58
|
|
|
57
59
|
<div class="padding-left--md padding-bottom--md">
|
|
58
60
|
<strong>cause</strong>: <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a>
|
|
59
61
|
<div class="padding-left--md">
|
|
60
62
|
|
|
61
|
-
|
|
62
|
-
|
|
63
63
|
</div>
|
|
64
64
|
|
|
65
|
-
|
|
66
|
-
|
|
67
65
|
</div>
|
|
68
66
|
|
|
67
|
+
### PlatformBinary
|
|
69
68
|
|
|
70
|
-
|
|
71
|
-
### PlatformBinary
|
|
72
69
|
<!-- default child "Class" -->
|
|
73
|
-
Represents an environment agnostic (browser vs node) abstraction layer for binary data.
|
|
74
70
|
|
|
71
|
+
Represents an environment agnostic (browser vs node) abstraction layer for binary data.
|
|
75
72
|
|
|
76
73
|
#### Properties
|
|
77
74
|
|
|
@@ -79,18 +76,12 @@ Represents an environment agnostic (browser vs node) abstraction layer for binar
|
|
|
79
76
|
<strong>data</strong>: <a href="#arraybuffer">ArrayBuffer</a> | <a href="#blob">Blob</a> | <a href="#readablestream">ReadableStream</a><<a href="#uint8array">Uint8Array</a>>
|
|
80
77
|
<div class="padding-left--md">
|
|
81
78
|
|
|
82
|
-
|
|
83
|
-
|
|
84
79
|
</div>
|
|
85
80
|
|
|
86
|
-
|
|
87
|
-
|
|
88
81
|
</div>
|
|
89
82
|
|
|
90
|
-
|
|
91
83
|
#### Methods
|
|
92
84
|
|
|
93
|
-
|
|
94
85
|
##### get
|
|
95
86
|
|
|
96
87
|
<div class="padding-bottom--md">
|
|
@@ -100,7 +91,6 @@ Represents an environment agnostic (browser vs node) abstraction layer for binar
|
|
|
100
91
|
|
|
101
92
|
Returns the binary data in a form that conforms to the specified type.
|
|
102
93
|
|
|
103
|
-
|
|
104
94
|
**Parameters**
|
|
105
95
|
|
|
106
96
|
<div class="padding-left--md padding-bottom--md">
|
|
@@ -112,25 +102,14 @@ Can be `text`, `json`, `array-buffer`, `blob`, `readable-stream`, `buffer` or `s
|
|
|
112
102
|
|
|
113
103
|
</div>
|
|
114
104
|
|
|
115
|
-
|
|
116
|
-
|
|
117
105
|
</div>
|
|
118
106
|
|
|
119
|
-
|
|
120
|
-
|
|
121
107
|
<!-- no returns -->
|
|
122
108
|
|
|
123
|
-
|
|
124
|
-
|
|
125
109
|
</div>
|
|
126
110
|
|
|
127
|
-
|
|
128
|
-
|
|
129
111
|
</div>
|
|
130
112
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
113
|
##### from
|
|
135
114
|
|
|
136
115
|
<div class="padding-bottom--md">
|
|
@@ -138,38 +117,22 @@ Can be `text`, `json`, `array-buffer`, `blob`, `readable-stream`, `buffer` or `s
|
|
|
138
117
|
|
|
139
118
|
<div class="padding-left--md">
|
|
140
119
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
120
|
**Parameters**
|
|
145
121
|
|
|
146
122
|
<div class="padding-left--md padding-bottom--md">
|
|
147
123
|
<strong>data</strong>: <a href="#arraybuffer">ArrayBuffer</a> | <a href="#blob">Blob</a> | <a href="#readablestream">ReadableStream</a><<a href="#uint8array">Uint8Array</a>> | <a href="#buffer">Buffer</a> | <a href="#readable">Readable</a>
|
|
148
124
|
<div class="padding-left--md">
|
|
149
125
|
|
|
150
|
-
|
|
151
|
-
|
|
152
126
|
</div>
|
|
153
127
|
|
|
154
|
-
|
|
155
|
-
|
|
156
128
|
</div>
|
|
157
129
|
|
|
158
|
-
|
|
159
|
-
|
|
160
130
|
<!-- no returns -->
|
|
161
131
|
|
|
162
|
-
|
|
163
|
-
|
|
164
132
|
</div>
|
|
165
133
|
|
|
166
|
-
|
|
167
|
-
|
|
168
134
|
</div>
|
|
169
135
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
136
|
##### fromJson
|
|
174
137
|
|
|
175
138
|
<div class="padding-bottom--md">
|
|
@@ -177,38 +140,22 @@ Can be `text`, `json`, `array-buffer`, `blob`, `readable-stream`, `buffer` or `s
|
|
|
177
140
|
|
|
178
141
|
<div class="padding-left--md">
|
|
179
142
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
143
|
**Parameters**
|
|
184
144
|
|
|
185
145
|
<div class="padding-left--md padding-bottom--md">
|
|
186
146
|
<strong>json</strong>: <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a>
|
|
187
147
|
<div class="padding-left--md">
|
|
188
148
|
|
|
189
|
-
|
|
190
|
-
|
|
191
149
|
</div>
|
|
192
150
|
|
|
193
|
-
|
|
194
|
-
|
|
195
151
|
</div>
|
|
196
152
|
|
|
197
|
-
|
|
198
|
-
|
|
199
153
|
<!-- no returns -->
|
|
200
154
|
|
|
201
|
-
|
|
202
|
-
|
|
203
155
|
</div>
|
|
204
156
|
|
|
205
|
-
|
|
206
|
-
|
|
207
157
|
</div>
|
|
208
158
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
159
|
##### fromText
|
|
213
160
|
|
|
214
161
|
<div class="padding-bottom--md">
|
|
@@ -216,46 +163,30 @@ Can be `text`, `json`, `array-buffer`, `blob`, `readable-stream`, `buffer` or `s
|
|
|
216
163
|
|
|
217
164
|
<div class="padding-left--md">
|
|
218
165
|
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
166
|
**Parameters**
|
|
223
167
|
|
|
224
168
|
<div class="padding-left--md padding-bottom--md">
|
|
225
169
|
<strong>text</strong>: <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a>
|
|
226
170
|
<div class="padding-left--md">
|
|
227
171
|
|
|
228
|
-
|
|
229
|
-
|
|
230
172
|
</div>
|
|
231
173
|
|
|
232
|
-
|
|
233
|
-
|
|
234
174
|
</div>
|
|
235
175
|
|
|
236
|
-
|
|
237
|
-
|
|
238
176
|
<!-- no returns -->
|
|
239
177
|
|
|
240
|
-
|
|
241
|
-
|
|
242
178
|
</div>
|
|
243
179
|
|
|
244
|
-
|
|
245
|
-
|
|
246
180
|
</div>
|
|
247
181
|
|
|
182
|
+
### PlatformDataTypeError
|
|
248
183
|
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
### PlatformDataTypeError
|
|
252
184
|
<!-- default child "Class" -->
|
|
253
185
|
|
|
254
|
-
|
|
255
|
-
|
|
256
186
|
#### Constructors
|
|
257
187
|
|
|
258
188
|
##### new PlatformDataTypeError(message,cause?)
|
|
189
|
+
|
|
259
190
|
<div class="padding-left--md">
|
|
260
191
|
|
|
261
192
|
**Parameters**
|
|
@@ -264,32 +195,19 @@ Can be `text`, `json`, `array-buffer`, `blob`, `readable-stream`, `buffer` or `s
|
|
|
264
195
|
<strong>message</strong>: <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a>
|
|
265
196
|
<div class="padding-left--md">
|
|
266
197
|
|
|
267
|
-
|
|
268
|
-
|
|
269
198
|
</div>
|
|
270
199
|
|
|
271
|
-
|
|
272
|
-
|
|
273
200
|
</div>
|
|
274
|
-
|
|
275
201
|
<div class="padding-left--md padding-bottom--md">
|
|
276
202
|
<strong>cause</strong>: <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a>
|
|
277
203
|
<div class="padding-left--md">
|
|
278
204
|
|
|
279
|
-
|
|
280
|
-
|
|
281
205
|
</div>
|
|
282
206
|
|
|
283
|
-
|
|
284
|
-
|
|
285
207
|
</div>
|
|
286
208
|
|
|
287
|
-
|
|
288
|
-
|
|
289
209
|
</div>
|
|
290
210
|
|
|
291
|
-
|
|
292
|
-
|
|
293
211
|
#### Properties
|
|
294
212
|
|
|
295
213
|
<div class="padding-left--md padding-bottom--md">
|
|
@@ -300,11 +218,8 @@ The error root cause.
|
|
|
300
218
|
|
|
301
219
|
</div>
|
|
302
220
|
|
|
303
|
-
|
|
304
|
-
|
|
305
221
|
</div>
|
|
306
222
|
|
|
307
|
-
|
|
308
223
|
<div class="padding-left--md padding-bottom--md">
|
|
309
224
|
<strong>name</strong>: "DataTypeError"
|
|
310
225
|
<div class="padding-left--md">
|
|
@@ -313,35 +228,29 @@ The error name.
|
|
|
313
228
|
|
|
314
229
|
</div>
|
|
315
230
|
|
|
316
|
-
|
|
317
|
-
|
|
318
231
|
</div>
|
|
319
232
|
|
|
233
|
+
### PlatformHttpClient
|
|
320
234
|
|
|
321
|
-
|
|
322
|
-
### PlatformHttpClient
|
|
323
235
|
<!-- default child "Class" -->
|
|
236
|
+
|
|
324
237
|
The http client that serves as an environment agnostic (browser vs node) abstraction for making http calls.
|
|
325
238
|
It handles the authentication of the requests made to the Platform Services and the Serverless Functions.
|
|
326
239
|
|
|
327
240
|
Currently, only the requests to the Platform Services and the Serverless Functions are supported.
|
|
328
241
|
|
|
329
|
-
|
|
330
242
|
#### Constructors
|
|
331
243
|
|
|
332
244
|
##### new PlatformHttpClient()
|
|
333
|
-
<div class="padding-left--md">
|
|
334
245
|
|
|
335
|
-
|
|
246
|
+
<div class="padding-left--md">
|
|
336
247
|
|
|
248
|
+
**Parameters**
|
|
337
249
|
|
|
338
250
|
</div>
|
|
339
251
|
|
|
340
|
-
|
|
341
|
-
|
|
342
252
|
#### Methods
|
|
343
253
|
|
|
344
|
-
|
|
345
254
|
##### send
|
|
346
255
|
|
|
347
256
|
<div class="padding-bottom--md">
|
|
@@ -352,12 +261,12 @@ Currently, only the requests to the Platform Services and the Serverless Functio
|
|
|
352
261
|
Sends an http request as configured by the `options`.
|
|
353
262
|
Returns a promise that resolves with a response object for successful requests or rejects with an appropriate error
|
|
354
263
|
when one of the following situations happen:
|
|
264
|
+
|
|
355
265
|
- `DataTypeError` - request body does not conform to the specified request body type,
|
|
356
266
|
- `HttpClientRequestError` - request cannot be sent (e.g. due to network error or invalid request),
|
|
357
267
|
- `HttpClientResponseError` - response status is considered invalid by the status validator,
|
|
358
268
|
- `HttpClientAbortError` - request was aborted.
|
|
359
269
|
|
|
360
|
-
|
|
361
270
|
**Parameters**
|
|
362
271
|
|
|
363
272
|
<div class="padding-left--md padding-bottom--md">
|
|
@@ -368,12 +277,8 @@ Options used to configure the request.
|
|
|
368
277
|
|
|
369
278
|
</div>
|
|
370
279
|
|
|
371
|
-
|
|
372
|
-
|
|
373
280
|
</div>
|
|
374
281
|
|
|
375
|
-
|
|
376
|
-
|
|
377
282
|
#### Returns
|
|
378
283
|
|
|
379
284
|
<div class="padding-left--md">
|
|
@@ -381,27 +286,20 @@ Promise<HttpClientResponse> A promise that resolves with the response obje
|
|
|
381
286
|
|
|
382
287
|
</div>
|
|
383
288
|
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
289
|
</div>
|
|
389
290
|
|
|
390
|
-
|
|
391
|
-
|
|
392
291
|
</div>
|
|
393
292
|
|
|
293
|
+
### PlatformHttpClientAbortError
|
|
394
294
|
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
### PlatformHttpClientAbortError
|
|
398
295
|
<!-- default child "Class" -->
|
|
399
|
-
Represents a situation when the request was aborted.
|
|
400
296
|
|
|
297
|
+
Represents a situation when the request was aborted.
|
|
401
298
|
|
|
402
299
|
#### Constructors
|
|
403
300
|
|
|
404
301
|
##### new PlatformHttpClientAbortError(cause)
|
|
302
|
+
|
|
405
303
|
<div class="padding-left--md">
|
|
406
304
|
|
|
407
305
|
**Parameters**
|
|
@@ -410,20 +308,12 @@ Represents a situation when the request was aborted.
|
|
|
410
308
|
<strong>cause</strong>: <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a>
|
|
411
309
|
<div class="padding-left--md">
|
|
412
310
|
|
|
413
|
-
|
|
414
|
-
|
|
415
311
|
</div>
|
|
416
312
|
|
|
417
|
-
|
|
418
|
-
|
|
419
313
|
</div>
|
|
420
314
|
|
|
421
|
-
|
|
422
|
-
|
|
423
315
|
</div>
|
|
424
316
|
|
|
425
|
-
|
|
426
|
-
|
|
427
317
|
#### Properties
|
|
428
318
|
|
|
429
319
|
<div class="padding-left--md padding-bottom--md">
|
|
@@ -434,11 +324,8 @@ The error root cause.
|
|
|
434
324
|
|
|
435
325
|
</div>
|
|
436
326
|
|
|
437
|
-
|
|
438
|
-
|
|
439
327
|
</div>
|
|
440
328
|
|
|
441
|
-
|
|
442
329
|
<div class="padding-left--md padding-bottom--md">
|
|
443
330
|
<strong>name</strong>: "AbortError"
|
|
444
331
|
<div class="padding-left--md">
|
|
@@ -447,20 +334,18 @@ The error name.
|
|
|
447
334
|
|
|
448
335
|
</div>
|
|
449
336
|
|
|
450
|
-
|
|
451
|
-
|
|
452
337
|
</div>
|
|
453
338
|
|
|
339
|
+
### PlatformHttpClientRequestError
|
|
454
340
|
|
|
455
|
-
|
|
456
|
-
### PlatformHttpClientRequestError
|
|
457
341
|
<!-- default child "Class" -->
|
|
458
|
-
Represents a situation when the request is invalid and cannot be sent.
|
|
459
342
|
|
|
343
|
+
Represents a situation when the request is invalid and cannot be sent.
|
|
460
344
|
|
|
461
345
|
#### Constructors
|
|
462
346
|
|
|
463
347
|
##### new PlatformHttpClientRequestError(cause)
|
|
348
|
+
|
|
464
349
|
<div class="padding-left--md">
|
|
465
350
|
|
|
466
351
|
**Parameters**
|
|
@@ -469,20 +354,12 @@ Represents a situation when the request is invalid and cannot be sent.
|
|
|
469
354
|
<strong>cause</strong>: <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a>
|
|
470
355
|
<div class="padding-left--md">
|
|
471
356
|
|
|
472
|
-
|
|
473
|
-
|
|
474
357
|
</div>
|
|
475
358
|
|
|
476
|
-
|
|
477
|
-
|
|
478
359
|
</div>
|
|
479
360
|
|
|
480
|
-
|
|
481
|
-
|
|
482
361
|
</div>
|
|
483
362
|
|
|
484
|
-
|
|
485
|
-
|
|
486
363
|
#### Properties
|
|
487
364
|
|
|
488
365
|
<div class="padding-left--md padding-bottom--md">
|
|
@@ -493,11 +370,8 @@ The error root cause.
|
|
|
493
370
|
|
|
494
371
|
</div>
|
|
495
372
|
|
|
496
|
-
|
|
497
|
-
|
|
498
373
|
</div>
|
|
499
374
|
|
|
500
|
-
|
|
501
375
|
<div class="padding-left--md padding-bottom--md">
|
|
502
376
|
<strong>name</strong>: "RequestError"
|
|
503
377
|
<div class="padding-left--md">
|
|
@@ -506,20 +380,18 @@ The error name.
|
|
|
506
380
|
|
|
507
381
|
</div>
|
|
508
382
|
|
|
509
|
-
|
|
510
|
-
|
|
511
383
|
</div>
|
|
512
384
|
|
|
385
|
+
### PlatformHttpClientResponse
|
|
513
386
|
|
|
514
|
-
|
|
515
|
-
### PlatformHttpClientResponse
|
|
516
387
|
<!-- default child "Class" -->
|
|
517
|
-
Represents the response to a request.
|
|
518
388
|
|
|
389
|
+
Represents the response to a request.
|
|
519
390
|
|
|
520
391
|
#### Constructors
|
|
521
392
|
|
|
522
393
|
##### new PlatformHttpClientResponse(response)
|
|
394
|
+
|
|
523
395
|
<div class="padding-left--md">
|
|
524
396
|
|
|
525
397
|
**Parameters**
|
|
@@ -528,45 +400,40 @@ Represents the response to a request.
|
|
|
528
400
|
<strong>response</strong>: <a href="#response">Response</a>
|
|
529
401
|
<div class="padding-left--md">
|
|
530
402
|
|
|
531
|
-
|
|
532
|
-
|
|
533
403
|
</div>
|
|
534
404
|
|
|
535
|
-
|
|
536
|
-
|
|
537
405
|
</div>
|
|
538
406
|
|
|
539
|
-
|
|
540
|
-
|
|
541
407
|
</div>
|
|
542
408
|
|
|
543
|
-
|
|
544
|
-
|
|
545
409
|
#### Accessors
|
|
546
410
|
|
|
547
|
-
##### headers
|
|
411
|
+
##### headers
|
|
412
|
+
|
|
548
413
|
<!-- default child "Accessor" -->
|
|
414
|
+
|
|
549
415
|
The response headers.
|
|
550
416
|
|
|
417
|
+
##### status
|
|
551
418
|
|
|
552
|
-
##### status
|
|
553
419
|
<!-- default child "Accessor" -->
|
|
420
|
+
|
|
554
421
|
The status code of the response.
|
|
555
422
|
|
|
423
|
+
##### statusText
|
|
556
424
|
|
|
557
|
-
##### statusText
|
|
558
425
|
<!-- default child "Accessor" -->
|
|
426
|
+
|
|
559
427
|
The status message corresponding to the status code.
|
|
560
428
|
|
|
429
|
+
##### url
|
|
561
430
|
|
|
562
|
-
##### url
|
|
563
431
|
<!-- default child "Accessor" -->
|
|
564
|
-
The URL of the response.
|
|
565
432
|
|
|
433
|
+
The URL of the response.
|
|
566
434
|
|
|
567
435
|
#### Methods
|
|
568
436
|
|
|
569
|
-
|
|
570
437
|
##### body
|
|
571
438
|
|
|
572
439
|
<div class="padding-bottom--md">
|
|
@@ -576,7 +443,6 @@ The URL of the response.
|
|
|
576
443
|
|
|
577
444
|
Returns the response body in a form that conforms to the specified response body type.
|
|
578
445
|
|
|
579
|
-
|
|
580
446
|
**Parameters**
|
|
581
447
|
|
|
582
448
|
<div class="padding-left--md padding-bottom--md">
|
|
@@ -589,33 +455,24 @@ The default response body type is `json`.
|
|
|
589
455
|
|
|
590
456
|
</div>
|
|
591
457
|
|
|
592
|
-
|
|
593
|
-
|
|
594
458
|
</div>
|
|
595
459
|
|
|
596
|
-
|
|
597
|
-
|
|
598
460
|
<!-- no returns -->
|
|
599
461
|
|
|
600
|
-
|
|
601
|
-
|
|
602
462
|
</div>
|
|
603
463
|
|
|
604
|
-
|
|
605
|
-
|
|
606
464
|
</div>
|
|
607
465
|
|
|
466
|
+
### PlatformHttpClientResponseError
|
|
608
467
|
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
### PlatformHttpClientResponseError
|
|
612
468
|
<!-- default child "Class" -->
|
|
613
|
-
Represents a situation when the response status is considered invalid by the status validator.
|
|
614
469
|
|
|
470
|
+
Represents a situation when the response status is considered invalid by the status validator.
|
|
615
471
|
|
|
616
472
|
#### Constructors
|
|
617
473
|
|
|
618
474
|
##### new PlatformHttpClientResponseError(response)
|
|
475
|
+
|
|
619
476
|
<div class="padding-left--md">
|
|
620
477
|
|
|
621
478
|
**Parameters**
|
|
@@ -624,20 +481,12 @@ Represents a situation when the response status is considered invalid by the sta
|
|
|
624
481
|
<strong>response</strong>: <a href="#response">Response</a>
|
|
625
482
|
<div class="padding-left--md">
|
|
626
483
|
|
|
627
|
-
|
|
628
|
-
|
|
629
484
|
</div>
|
|
630
485
|
|
|
631
|
-
|
|
632
|
-
|
|
633
486
|
</div>
|
|
634
487
|
|
|
635
|
-
|
|
636
|
-
|
|
637
488
|
</div>
|
|
638
489
|
|
|
639
|
-
|
|
640
|
-
|
|
641
490
|
#### Properties
|
|
642
491
|
|
|
643
492
|
<div class="padding-left--md padding-bottom--md">
|
|
@@ -648,11 +497,8 @@ The error root cause.
|
|
|
648
497
|
|
|
649
498
|
</div>
|
|
650
499
|
|
|
651
|
-
|
|
652
|
-
|
|
653
500
|
</div>
|
|
654
501
|
|
|
655
|
-
|
|
656
502
|
<div class="padding-left--md padding-bottom--md">
|
|
657
503
|
<strong>name</strong>: "ResponseError"
|
|
658
504
|
<div class="padding-left--md">
|
|
@@ -661,11 +507,8 @@ The error name.
|
|
|
661
507
|
|
|
662
508
|
</div>
|
|
663
509
|
|
|
664
|
-
|
|
665
|
-
|
|
666
510
|
</div>
|
|
667
511
|
|
|
668
|
-
|
|
669
512
|
<div class="padding-left--md padding-bottom--md">
|
|
670
513
|
<strong>response</strong>: <a href="#httpclientresponse">HttpClientResponse</a>
|
|
671
514
|
<div class="padding-left--md">
|
|
@@ -674,20 +517,16 @@ The response.
|
|
|
674
517
|
|
|
675
518
|
</div>
|
|
676
519
|
|
|
677
|
-
|
|
678
|
-
|
|
679
520
|
</div>
|
|
680
521
|
|
|
522
|
+
### PlatformUnsupportedOperationError
|
|
681
523
|
|
|
682
|
-
|
|
683
|
-
### PlatformUnsupportedOperationError
|
|
684
524
|
<!-- default child "Class" -->
|
|
685
525
|
|
|
686
|
-
|
|
687
|
-
|
|
688
526
|
#### Constructors
|
|
689
527
|
|
|
690
528
|
##### new PlatformUnsupportedOperationError(message,cause?)
|
|
529
|
+
|
|
691
530
|
<div class="padding-left--md">
|
|
692
531
|
|
|
693
532
|
**Parameters**
|
|
@@ -696,32 +535,19 @@ The response.
|
|
|
696
535
|
<strong>message</strong>: <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a>
|
|
697
536
|
<div class="padding-left--md">
|
|
698
537
|
|
|
699
|
-
|
|
700
|
-
|
|
701
538
|
</div>
|
|
702
539
|
|
|
703
|
-
|
|
704
|
-
|
|
705
540
|
</div>
|
|
706
|
-
|
|
707
541
|
<div class="padding-left--md padding-bottom--md">
|
|
708
542
|
<strong>cause</strong>: <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a>
|
|
709
543
|
<div class="padding-left--md">
|
|
710
544
|
|
|
711
|
-
|
|
712
|
-
|
|
713
545
|
</div>
|
|
714
546
|
|
|
715
|
-
|
|
716
|
-
|
|
717
547
|
</div>
|
|
718
548
|
|
|
719
|
-
|
|
720
|
-
|
|
721
549
|
</div>
|
|
722
550
|
|
|
723
|
-
|
|
724
|
-
|
|
725
551
|
#### Properties
|
|
726
552
|
|
|
727
553
|
<div class="padding-left--md padding-bottom--md">
|
|
@@ -732,11 +558,8 @@ The error root cause.
|
|
|
732
558
|
|
|
733
559
|
</div>
|
|
734
560
|
|
|
735
|
-
|
|
736
|
-
|
|
737
561
|
</div>
|
|
738
562
|
|
|
739
|
-
|
|
740
563
|
<div class="padding-left--md padding-bottom--md">
|
|
741
564
|
<strong>name</strong>: "UnsupportedOperationError"
|
|
742
565
|
<div class="padding-left--md">
|
|
@@ -745,17 +568,15 @@ The error name.
|
|
|
745
568
|
|
|
746
569
|
</div>
|
|
747
570
|
|
|
748
|
-
|
|
749
|
-
|
|
750
571
|
</div>
|
|
751
572
|
|
|
752
|
-
|
|
753
573
|
## Interfaces
|
|
754
574
|
|
|
755
|
-
### AbortController
|
|
575
|
+
### AbortController
|
|
576
|
+
|
|
756
577
|
<!-- default child "Interface" -->
|
|
757
|
-
Represents a controller object that allows to abort one or more requests as and when desired.
|
|
758
578
|
|
|
579
|
+
Represents a controller object that allows to abort one or more requests as and when desired.
|
|
759
580
|
|
|
760
581
|
#### Properties
|
|
761
582
|
|
|
@@ -767,14 +588,10 @@ Returns an AbortSignal object instance, which can be used to communicate with a
|
|
|
767
588
|
|
|
768
589
|
</div>
|
|
769
590
|
|
|
770
|
-
|
|
771
|
-
|
|
772
591
|
</div>
|
|
773
592
|
|
|
774
|
-
|
|
775
593
|
#### Methods
|
|
776
594
|
|
|
777
|
-
|
|
778
595
|
##### abort
|
|
779
596
|
|
|
780
597
|
<div class="padding-bottom--md">
|
|
@@ -784,27 +601,19 @@ Returns an AbortSignal object instance, which can be used to communicate with a
|
|
|
784
601
|
|
|
785
602
|
Aborts a request before it has completed.
|
|
786
603
|
|
|
787
|
-
|
|
788
|
-
<!-- no parameters -->
|
|
789
|
-
|
|
604
|
+
**Parameters**
|
|
790
605
|
|
|
791
606
|
<!-- no returns -->
|
|
792
607
|
|
|
793
|
-
|
|
794
|
-
|
|
795
608
|
</div>
|
|
796
609
|
|
|
797
|
-
|
|
798
|
-
|
|
799
610
|
</div>
|
|
800
611
|
|
|
612
|
+
### AbortSignal
|
|
801
613
|
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
### AbortSignal
|
|
805
614
|
<!-- default child "Interface" -->
|
|
806
|
-
Represents a signal object that allows to communicate with the request and abort it using the `AbortController`.
|
|
807
615
|
|
|
616
|
+
Represents a signal object that allows to communicate with the request and abort it using the `AbortController`.
|
|
808
617
|
|
|
809
618
|
#### Properties
|
|
810
619
|
|
|
@@ -816,11 +625,8 @@ A flag indicating whether the requests the signal is communicating with are abor
|
|
|
816
625
|
|
|
817
626
|
</div>
|
|
818
627
|
|
|
819
|
-
|
|
820
|
-
|
|
821
628
|
</div>
|
|
822
629
|
|
|
823
|
-
|
|
824
630
|
<div class="padding-left--md padding-bottom--md">
|
|
825
631
|
<strong>onabort</strong>: null | Object
|
|
826
632
|
<div class="padding-left--md">
|
|
@@ -829,27 +635,18 @@ Invoked when the requests the signal is communicating with are aborted.
|
|
|
829
635
|
|
|
830
636
|
</div>
|
|
831
637
|
|
|
832
|
-
|
|
833
|
-
|
|
834
638
|
</div>
|
|
835
639
|
|
|
836
|
-
|
|
837
640
|
<div class="padding-left--md padding-bottom--md">
|
|
838
641
|
<strong>reason</strong>: <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a>
|
|
839
642
|
<div class="padding-left--md">
|
|
840
643
|
|
|
841
|
-
|
|
842
|
-
|
|
843
644
|
</div>
|
|
844
645
|
|
|
845
|
-
|
|
846
|
-
|
|
847
646
|
</div>
|
|
848
647
|
|
|
849
|
-
|
|
850
648
|
#### Methods
|
|
851
649
|
|
|
852
|
-
|
|
853
650
|
##### throwIfAborted
|
|
854
651
|
|
|
855
652
|
<div class="padding-bottom--md">
|
|
@@ -857,67 +654,44 @@ Invoked when the requests the signal is communicating with are aborted.
|
|
|
857
654
|
|
|
858
655
|
<div class="padding-left--md">
|
|
859
656
|
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
<!-- no parameters -->
|
|
864
|
-
|
|
657
|
+
**Parameters**
|
|
865
658
|
|
|
866
659
|
<!-- no returns -->
|
|
867
660
|
|
|
868
|
-
|
|
869
|
-
|
|
870
661
|
</div>
|
|
871
662
|
|
|
872
|
-
|
|
873
|
-
|
|
874
663
|
</div>
|
|
875
664
|
|
|
665
|
+
### BaseError
|
|
876
666
|
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
### BaseError
|
|
880
667
|
<!-- default child "Interface" -->
|
|
881
668
|
|
|
882
|
-
|
|
883
|
-
|
|
884
669
|
#### Properties
|
|
885
670
|
|
|
886
671
|
<div class="padding-left--md padding-bottom--md">
|
|
887
672
|
<strong>cause</strong>: <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a>
|
|
888
673
|
<div class="padding-left--md">
|
|
889
674
|
|
|
890
|
-
|
|
891
|
-
|
|
892
675
|
</div>
|
|
893
676
|
|
|
894
|
-
|
|
895
|
-
|
|
896
677
|
</div>
|
|
897
678
|
|
|
898
|
-
|
|
899
679
|
<div class="padding-left--md padding-bottom--md">
|
|
900
680
|
<strong>name</strong>: <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a>
|
|
901
681
|
<div class="padding-left--md">
|
|
902
682
|
|
|
903
|
-
|
|
904
|
-
|
|
905
683
|
</div>
|
|
906
684
|
|
|
907
|
-
|
|
908
|
-
|
|
909
685
|
</div>
|
|
910
686
|
|
|
687
|
+
### Binary
|
|
911
688
|
|
|
912
|
-
|
|
913
|
-
### Binary
|
|
914
689
|
<!-- default child "Interface" -->
|
|
915
|
-
Represents an environment agnostic (browser vs node) abstraction layer for binary data.
|
|
916
690
|
|
|
691
|
+
Represents an environment agnostic (browser vs node) abstraction layer for binary data.
|
|
917
692
|
|
|
918
693
|
#### Methods
|
|
919
694
|
|
|
920
|
-
|
|
921
695
|
##### get
|
|
922
696
|
|
|
923
697
|
<div class="padding-bottom--md">
|
|
@@ -927,7 +701,6 @@ Represents an environment agnostic (browser vs node) abstraction layer for binar
|
|
|
927
701
|
|
|
928
702
|
Returns the binary data in a form that conforms to the specified type.
|
|
929
703
|
|
|
930
|
-
|
|
931
704
|
**Parameters**
|
|
932
705
|
|
|
933
706
|
<div class="padding-left--md padding-bottom--md">
|
|
@@ -939,29 +712,19 @@ Can be `text`, `json`, `array-buffer`, `blob`, `readable-stream`, `buffer` or `s
|
|
|
939
712
|
|
|
940
713
|
</div>
|
|
941
714
|
|
|
942
|
-
|
|
943
|
-
|
|
944
715
|
</div>
|
|
945
716
|
|
|
946
|
-
|
|
947
|
-
|
|
948
717
|
<!-- no returns -->
|
|
949
718
|
|
|
950
|
-
|
|
951
|
-
|
|
952
719
|
</div>
|
|
953
720
|
|
|
954
|
-
|
|
955
|
-
|
|
956
721
|
</div>
|
|
957
722
|
|
|
723
|
+
### BinaryFormDataRequestField
|
|
958
724
|
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
### BinaryFormDataRequestField
|
|
962
725
|
<!-- default child "Interface" -->
|
|
963
|
-
Represents an binary field.
|
|
964
726
|
|
|
727
|
+
Represents an binary field.
|
|
965
728
|
|
|
966
729
|
#### Properties
|
|
967
730
|
|
|
@@ -974,11 +737,8 @@ The default content type for the binary is 'application/octet-stream'.
|
|
|
974
737
|
|
|
975
738
|
</div>
|
|
976
739
|
|
|
977
|
-
|
|
978
|
-
|
|
979
740
|
</div>
|
|
980
741
|
|
|
981
|
-
|
|
982
742
|
<div class="padding-left--md padding-bottom--md">
|
|
983
743
|
<strong>filename</strong>: <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a>
|
|
984
744
|
<div class="padding-left--md">
|
|
@@ -988,11 +748,8 @@ The default filename for the binary is 'binary'.
|
|
|
988
748
|
|
|
989
749
|
</div>
|
|
990
750
|
|
|
991
|
-
|
|
992
|
-
|
|
993
751
|
</div>
|
|
994
752
|
|
|
995
|
-
|
|
996
753
|
<div class="padding-left--md padding-bottom--md">
|
|
997
754
|
<strong>name</strong>: <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a>
|
|
998
755
|
<div class="padding-left--md">
|
|
@@ -1001,11 +758,8 @@ The name of the field.
|
|
|
1001
758
|
|
|
1002
759
|
</div>
|
|
1003
760
|
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
761
|
</div>
|
|
1007
762
|
|
|
1008
|
-
|
|
1009
763
|
<div class="padding-left--md padding-bottom--md">
|
|
1010
764
|
<strong>type</strong>: "binary"
|
|
1011
765
|
<div class="padding-left--md">
|
|
@@ -1014,11 +768,8 @@ A binary field type discriminator.
|
|
|
1014
768
|
|
|
1015
769
|
</div>
|
|
1016
770
|
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
771
|
</div>
|
|
1020
772
|
|
|
1021
|
-
|
|
1022
773
|
<div class="padding-left--md padding-bottom--md">
|
|
1023
774
|
<strong>value</strong>: <a href="#arraybuffer">ArrayBuffer</a> | <a href="#blob">Blob</a> | <a href="#buffer">Buffer</a> | <a href="#readable">Readable</a> | <a href="#binary">Binary</a> | <a href="#readablestream">ReadableStream</a><<a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a>> | <a href="#file">File</a>
|
|
1024
775
|
<div class="padding-left--md">
|
|
@@ -1027,90 +778,58 @@ The field's value.
|
|
|
1027
778
|
|
|
1028
779
|
</div>
|
|
1029
780
|
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
781
|
</div>
|
|
1033
782
|
|
|
783
|
+
### BinaryFormDataResponseField
|
|
1034
784
|
|
|
1035
|
-
|
|
1036
|
-
### BinaryFormDataResponseField
|
|
1037
785
|
<!-- default child "Interface" -->
|
|
1038
786
|
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
787
|
#### Properties
|
|
1042
788
|
|
|
1043
789
|
<div class="padding-left--md padding-bottom--md">
|
|
1044
790
|
<strong>contentType</strong>: <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a>
|
|
1045
791
|
<div class="padding-left--md">
|
|
1046
792
|
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
793
|
</div>
|
|
1050
794
|
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
795
|
</div>
|
|
1054
796
|
|
|
1055
|
-
|
|
1056
797
|
<div class="padding-left--md padding-bottom--md">
|
|
1057
798
|
<strong>filename</strong>: <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a>
|
|
1058
799
|
<div class="padding-left--md">
|
|
1059
800
|
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
801
|
</div>
|
|
1063
802
|
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
803
|
</div>
|
|
1067
804
|
|
|
1068
|
-
|
|
1069
805
|
<div class="padding-left--md padding-bottom--md">
|
|
1070
806
|
<strong>name</strong>: <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a>
|
|
1071
807
|
<div class="padding-left--md">
|
|
1072
808
|
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
809
|
</div>
|
|
1076
810
|
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
811
|
</div>
|
|
1080
812
|
|
|
1081
|
-
|
|
1082
813
|
<div class="padding-left--md padding-bottom--md">
|
|
1083
814
|
<strong>type</strong>: "binary"
|
|
1084
815
|
<div class="padding-left--md">
|
|
1085
816
|
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
817
|
</div>
|
|
1089
818
|
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
819
|
</div>
|
|
1093
820
|
|
|
1094
|
-
|
|
1095
821
|
<div class="padding-left--md padding-bottom--md">
|
|
1096
822
|
<strong>value</strong>: <a href="#binary">Binary</a>
|
|
1097
823
|
<div class="padding-left--md">
|
|
1098
824
|
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
825
|
</div>
|
|
1102
826
|
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
827
|
</div>
|
|
1106
828
|
|
|
829
|
+
### DataTypeError
|
|
1107
830
|
|
|
1108
|
-
|
|
1109
|
-
### DataTypeError
|
|
1110
831
|
<!-- default child "Interface" -->
|
|
1111
832
|
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
833
|
#### Properties
|
|
1115
834
|
|
|
1116
835
|
<div class="padding-left--md padding-bottom--md">
|
|
@@ -1121,11 +840,8 @@ The error root cause.
|
|
|
1121
840
|
|
|
1122
841
|
</div>
|
|
1123
842
|
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
843
|
</div>
|
|
1127
844
|
|
|
1128
|
-
|
|
1129
845
|
<div class="padding-left--md padding-bottom--md">
|
|
1130
846
|
<strong>name</strong>: "DataTypeError"
|
|
1131
847
|
<div class="padding-left--md">
|
|
@@ -1134,28 +850,25 @@ The error name.
|
|
|
1134
850
|
|
|
1135
851
|
</div>
|
|
1136
852
|
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
853
|
</div>
|
|
1140
854
|
|
|
855
|
+
### Headers
|
|
1141
856
|
|
|
1142
|
-
|
|
1143
|
-
### Headers
|
|
1144
857
|
<!-- default child "Interface" -->
|
|
858
|
+
|
|
1145
859
|
Represents http headers.
|
|
1146
860
|
|
|
861
|
+
### HttpClient
|
|
1147
862
|
|
|
1148
|
-
### HttpClient
|
|
1149
863
|
<!-- default child "Interface" -->
|
|
864
|
+
|
|
1150
865
|
The http client that serves as an environment agnostic (browser vs node) abstraction for making http calls.
|
|
1151
866
|
It handles the authentication of the requests made to the Platform Services and the Serverless Functions.
|
|
1152
867
|
|
|
1153
868
|
Currently, only the requests to the Platform Services and the Serverless Functions are supported.
|
|
1154
869
|
|
|
1155
|
-
|
|
1156
870
|
#### Methods
|
|
1157
871
|
|
|
1158
|
-
|
|
1159
872
|
##### send
|
|
1160
873
|
|
|
1161
874
|
<div class="padding-bottom--md">
|
|
@@ -1166,12 +879,12 @@ Currently, only the requests to the Platform Services and the Serverless Functio
|
|
|
1166
879
|
Sends an http request as configured by the `options`.
|
|
1167
880
|
Returns a promise that resolves with a response object for successful requests or rejects with an appropriate error
|
|
1168
881
|
when one of the following situations happen:
|
|
882
|
+
|
|
1169
883
|
- `DataTypeError` - request body does not conform to the specified request body type,
|
|
1170
884
|
- `HttpClientRequestError` - request cannot be sent (e.g. due to network error or invalid request),
|
|
1171
885
|
- `HttpClientResponseError` - response status is considered invalid by the status validator,
|
|
1172
886
|
- `HttpClientAbortError` - request was aborted.
|
|
1173
887
|
|
|
1174
|
-
|
|
1175
888
|
**Parameters**
|
|
1176
889
|
|
|
1177
890
|
<div class="padding-left--md padding-bottom--md">
|
|
@@ -1182,12 +895,8 @@ Options used to configure the request.
|
|
|
1182
895
|
|
|
1183
896
|
</div>
|
|
1184
897
|
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
898
|
</div>
|
|
1188
899
|
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
900
|
#### Returns
|
|
1192
901
|
|
|
1193
902
|
<div class="padding-left--md">
|
|
@@ -1195,23 +904,15 @@ Promise<HttpClientResponse> A promise that resolves with the response obje
|
|
|
1195
904
|
|
|
1196
905
|
</div>
|
|
1197
906
|
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
907
|
</div>
|
|
1203
908
|
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
909
|
</div>
|
|
1207
910
|
|
|
911
|
+
### HttpClientAbortError
|
|
1208
912
|
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
### HttpClientAbortError
|
|
1212
913
|
<!-- default child "Interface" -->
|
|
1213
|
-
Represents a situation when the request was aborted.
|
|
1214
914
|
|
|
915
|
+
Represents a situation when the request was aborted.
|
|
1215
916
|
|
|
1216
917
|
#### Properties
|
|
1217
918
|
|
|
@@ -1223,11 +924,8 @@ The error root cause.
|
|
|
1223
924
|
|
|
1224
925
|
</div>
|
|
1225
926
|
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
927
|
</div>
|
|
1229
928
|
|
|
1230
|
-
|
|
1231
929
|
<div class="padding-left--md padding-bottom--md">
|
|
1232
930
|
<strong>name</strong>: "AbortError"
|
|
1233
931
|
<div class="padding-left--md">
|
|
@@ -1236,16 +934,13 @@ The error name.
|
|
|
1236
934
|
|
|
1237
935
|
</div>
|
|
1238
936
|
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
937
|
</div>
|
|
1242
938
|
|
|
939
|
+
### HttpClientNetworkError
|
|
1243
940
|
|
|
1244
|
-
|
|
1245
|
-
### HttpClientNetworkError
|
|
1246
941
|
<!-- default child "Interface" -->
|
|
1247
|
-
Represents a situation when a network error occurred.
|
|
1248
942
|
|
|
943
|
+
Represents a situation when a network error occurred.
|
|
1249
944
|
|
|
1250
945
|
#### Properties
|
|
1251
946
|
|
|
@@ -1257,11 +952,8 @@ The error root cause.
|
|
|
1257
952
|
|
|
1258
953
|
</div>
|
|
1259
954
|
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
955
|
</div>
|
|
1263
956
|
|
|
1264
|
-
|
|
1265
957
|
<div class="padding-left--md padding-bottom--md">
|
|
1266
958
|
<strong>name</strong>: "NetworkError"
|
|
1267
959
|
<div class="padding-left--md">
|
|
@@ -1270,16 +962,13 @@ The error name.
|
|
|
1270
962
|
|
|
1271
963
|
</div>
|
|
1272
964
|
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
965
|
</div>
|
|
1276
966
|
|
|
967
|
+
### HttpClientRequestError
|
|
1277
968
|
|
|
1278
|
-
|
|
1279
|
-
### HttpClientRequestError
|
|
1280
969
|
<!-- default child "Interface" -->
|
|
1281
|
-
Represents a situation when the request is invalid and cannot be sent.
|
|
1282
970
|
|
|
971
|
+
Represents a situation when the request is invalid and cannot be sent.
|
|
1283
972
|
|
|
1284
973
|
#### Properties
|
|
1285
974
|
|
|
@@ -1291,11 +980,8 @@ The error root cause.
|
|
|
1291
980
|
|
|
1292
981
|
</div>
|
|
1293
982
|
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
983
|
</div>
|
|
1297
984
|
|
|
1298
|
-
|
|
1299
985
|
<div class="padding-left--md padding-bottom--md">
|
|
1300
986
|
<strong>name</strong>: "RequestError"
|
|
1301
987
|
<div class="padding-left--md">
|
|
@@ -1304,16 +990,13 @@ The error name.
|
|
|
1304
990
|
|
|
1305
991
|
</div>
|
|
1306
992
|
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
993
|
</div>
|
|
1310
994
|
|
|
995
|
+
### HttpClientRequestOptions
|
|
1311
996
|
|
|
1312
|
-
|
|
1313
|
-
### HttpClientRequestOptions
|
|
1314
997
|
<!-- default child "Interface" -->
|
|
1315
|
-
Represents the options used to configure the request.
|
|
1316
998
|
|
|
999
|
+
Represents the options used to configure the request.
|
|
1317
1000
|
|
|
1318
1001
|
#### Properties
|
|
1319
1002
|
|
|
@@ -1325,11 +1008,8 @@ An AbortSignal instance that can be used to cancel the request.
|
|
|
1325
1008
|
|
|
1326
1009
|
</div>
|
|
1327
1010
|
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
1011
|
</div>
|
|
1331
1012
|
|
|
1332
|
-
|
|
1333
1013
|
<div class="padding-left--md padding-bottom--md">
|
|
1334
1014
|
<strong>body</strong>: <a href="#requestbodytypes">RequestBodyTypes</a><<a href="#t">T</a>>
|
|
1335
1015
|
<div class="padding-left--md">
|
|
@@ -1339,11 +1019,8 @@ The structure of the request body needs to conform to the specified request body
|
|
|
1339
1019
|
|
|
1340
1020
|
</div>
|
|
1341
1021
|
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
1022
|
</div>
|
|
1345
1023
|
|
|
1346
|
-
|
|
1347
1024
|
<div class="padding-left--md padding-bottom--md">
|
|
1348
1025
|
<strong>headers</strong>: <a href="#headers">Headers</a>
|
|
1349
1026
|
<div class="padding-left--md">
|
|
@@ -1352,11 +1029,8 @@ The request headers.
|
|
|
1352
1029
|
|
|
1353
1030
|
</div>
|
|
1354
1031
|
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
1032
|
</div>
|
|
1358
1033
|
|
|
1359
|
-
|
|
1360
1034
|
<div class="padding-left--md padding-bottom--md">
|
|
1361
1035
|
<strong>method</strong>: <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a>
|
|
1362
1036
|
<div class="padding-left--md">
|
|
@@ -1365,11 +1039,8 @@ The request method, e.g. `GET`, `POST`.
|
|
|
1365
1039
|
|
|
1366
1040
|
</div>
|
|
1367
1041
|
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
1042
|
</div>
|
|
1371
1043
|
|
|
1372
|
-
|
|
1373
1044
|
<div class="padding-left--md padding-bottom--md">
|
|
1374
1045
|
<strong>requestBodyType</strong>: <a href="#t">T</a>
|
|
1375
1046
|
<div class="padding-left--md">
|
|
@@ -1379,11 +1050,8 @@ The default request body type is `json`.
|
|
|
1379
1050
|
|
|
1380
1051
|
</div>
|
|
1381
1052
|
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
1053
|
</div>
|
|
1385
1054
|
|
|
1386
|
-
|
|
1387
1055
|
<div class="padding-left--md padding-bottom--md">
|
|
1388
1056
|
<strong>statusValidator</strong>: <a href="#statusvalidator">StatusValidator</a>
|
|
1389
1057
|
<div class="padding-left--md">
|
|
@@ -1395,11 +1063,8 @@ The default status validator function considers the `2xx` status codes as valid.
|
|
|
1395
1063
|
|
|
1396
1064
|
</div>
|
|
1397
1065
|
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
1066
|
</div>
|
|
1401
1067
|
|
|
1402
|
-
|
|
1403
1068
|
<div class="padding-left--md padding-bottom--md">
|
|
1404
1069
|
<strong>url</strong>: <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a>
|
|
1405
1070
|
<div class="padding-left--md">
|
|
@@ -1408,16 +1073,13 @@ The URL of the resource to fetch.
|
|
|
1408
1073
|
|
|
1409
1074
|
</div>
|
|
1410
1075
|
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
1076
|
</div>
|
|
1414
1077
|
|
|
1078
|
+
### HttpClientResponse
|
|
1415
1079
|
|
|
1416
|
-
|
|
1417
|
-
### HttpClientResponse
|
|
1418
1080
|
<!-- default child "Interface" -->
|
|
1419
|
-
Represents the response to a request.
|
|
1420
1081
|
|
|
1082
|
+
Represents the response to a request.
|
|
1421
1083
|
|
|
1422
1084
|
#### Properties
|
|
1423
1085
|
|
|
@@ -1429,11 +1091,8 @@ The response headers.
|
|
|
1429
1091
|
|
|
1430
1092
|
</div>
|
|
1431
1093
|
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
1094
|
</div>
|
|
1435
1095
|
|
|
1436
|
-
|
|
1437
1096
|
<div class="padding-left--md padding-bottom--md">
|
|
1438
1097
|
<strong>status</strong>: <a href="https://developer.mozilla.org/en-US/docs/Glossary/Number">number</a>
|
|
1439
1098
|
<div class="padding-left--md">
|
|
@@ -1442,11 +1101,8 @@ The status code of the response.
|
|
|
1442
1101
|
|
|
1443
1102
|
</div>
|
|
1444
1103
|
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
1104
|
</div>
|
|
1448
1105
|
|
|
1449
|
-
|
|
1450
1106
|
<div class="padding-left--md padding-bottom--md">
|
|
1451
1107
|
<strong>statusText</strong>: <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a>
|
|
1452
1108
|
<div class="padding-left--md">
|
|
@@ -1455,11 +1111,8 @@ The status message corresponding to the status code.
|
|
|
1455
1111
|
|
|
1456
1112
|
</div>
|
|
1457
1113
|
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
1114
|
</div>
|
|
1461
1115
|
|
|
1462
|
-
|
|
1463
1116
|
<div class="padding-left--md padding-bottom--md">
|
|
1464
1117
|
<strong>url</strong>: <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a>
|
|
1465
1118
|
<div class="padding-left--md">
|
|
@@ -1468,14 +1121,10 @@ The URL of the response.
|
|
|
1468
1121
|
|
|
1469
1122
|
</div>
|
|
1470
1123
|
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
1124
|
</div>
|
|
1474
1125
|
|
|
1475
|
-
|
|
1476
1126
|
#### Methods
|
|
1477
1127
|
|
|
1478
|
-
|
|
1479
1128
|
##### body
|
|
1480
1129
|
|
|
1481
1130
|
<div class="padding-bottom--md">
|
|
@@ -1485,7 +1134,6 @@ The URL of the response.
|
|
|
1485
1134
|
|
|
1486
1135
|
Returns the response body in a form that conforms to the specified response body type.
|
|
1487
1136
|
|
|
1488
|
-
|
|
1489
1137
|
**Parameters**
|
|
1490
1138
|
|
|
1491
1139
|
<div class="padding-left--md padding-bottom--md">
|
|
@@ -1498,29 +1146,19 @@ The default response body type is `json`.
|
|
|
1498
1146
|
|
|
1499
1147
|
</div>
|
|
1500
1148
|
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
1149
|
</div>
|
|
1504
1150
|
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
1151
|
<!-- no returns -->
|
|
1508
1152
|
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
1153
|
</div>
|
|
1512
1154
|
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
1155
|
</div>
|
|
1516
1156
|
|
|
1157
|
+
### HttpClientResponseError
|
|
1517
1158
|
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
### HttpClientResponseError
|
|
1521
1159
|
<!-- default child "Interface" -->
|
|
1522
|
-
Represents a situation when the response status is considered invalid by the status validator.
|
|
1523
1160
|
|
|
1161
|
+
Represents a situation when the response status is considered invalid by the status validator.
|
|
1524
1162
|
|
|
1525
1163
|
#### Properties
|
|
1526
1164
|
|
|
@@ -1532,11 +1170,8 @@ The error root cause.
|
|
|
1532
1170
|
|
|
1533
1171
|
</div>
|
|
1534
1172
|
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
1173
|
</div>
|
|
1538
1174
|
|
|
1539
|
-
|
|
1540
1175
|
<div class="padding-left--md padding-bottom--md">
|
|
1541
1176
|
<strong>name</strong>: "ResponseError"
|
|
1542
1177
|
<div class="padding-left--md">
|
|
@@ -1545,11 +1180,8 @@ The error name.
|
|
|
1545
1180
|
|
|
1546
1181
|
</div>
|
|
1547
1182
|
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
1183
|
</div>
|
|
1551
1184
|
|
|
1552
|
-
|
|
1553
1185
|
<div class="padding-left--md padding-bottom--md">
|
|
1554
1186
|
<strong>response</strong>: <a href="#httpclientresponse">HttpClientResponse</a>
|
|
1555
1187
|
<div class="padding-left--md">
|
|
@@ -1558,16 +1190,13 @@ The response.
|
|
|
1558
1190
|
|
|
1559
1191
|
</div>
|
|
1560
1192
|
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
1193
|
</div>
|
|
1564
1194
|
|
|
1195
|
+
### JsonFormDataRequestField
|
|
1565
1196
|
|
|
1566
|
-
|
|
1567
|
-
### JsonFormDataRequestField
|
|
1568
1197
|
<!-- default child "Interface" -->
|
|
1569
|
-
Represents a JSON field.
|
|
1570
1198
|
|
|
1199
|
+
Represents a JSON field.
|
|
1571
1200
|
|
|
1572
1201
|
#### Properties
|
|
1573
1202
|
|
|
@@ -1580,11 +1209,8 @@ The default content type for the JSON is 'application/json'.
|
|
|
1580
1209
|
|
|
1581
1210
|
</div>
|
|
1582
1211
|
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
1212
|
</div>
|
|
1586
1213
|
|
|
1587
|
-
|
|
1588
1214
|
<div class="padding-left--md padding-bottom--md">
|
|
1589
1215
|
<strong>filename</strong>: <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a>
|
|
1590
1216
|
<div class="padding-left--md">
|
|
@@ -1594,11 +1220,8 @@ The default filename for the JSON is 'json'.
|
|
|
1594
1220
|
|
|
1595
1221
|
</div>
|
|
1596
1222
|
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
1223
|
</div>
|
|
1600
1224
|
|
|
1601
|
-
|
|
1602
1225
|
<div class="padding-left--md padding-bottom--md">
|
|
1603
1226
|
<strong>name</strong>: <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a>
|
|
1604
1227
|
<div class="padding-left--md">
|
|
@@ -1607,11 +1230,8 @@ The name of the field.
|
|
|
1607
1230
|
|
|
1608
1231
|
</div>
|
|
1609
1232
|
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
1233
|
</div>
|
|
1613
1234
|
|
|
1614
|
-
|
|
1615
1235
|
<div class="padding-left--md padding-bottom--md">
|
|
1616
1236
|
<strong>type</strong>: "json"
|
|
1617
1237
|
<div class="padding-left--md">
|
|
@@ -1620,11 +1240,8 @@ A JSON field type discriminator.
|
|
|
1620
1240
|
|
|
1621
1241
|
</div>
|
|
1622
1242
|
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
1243
|
</div>
|
|
1626
1244
|
|
|
1627
|
-
|
|
1628
1245
|
<div class="padding-left--md padding-bottom--md">
|
|
1629
1246
|
<strong>value</strong>: <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a>
|
|
1630
1247
|
<div class="padding-left--md">
|
|
@@ -1633,21 +1250,17 @@ The field's value.
|
|
|
1633
1250
|
|
|
1634
1251
|
</div>
|
|
1635
1252
|
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
1253
|
</div>
|
|
1639
1254
|
|
|
1255
|
+
### StatusValidator
|
|
1640
1256
|
|
|
1641
|
-
|
|
1642
|
-
### StatusValidator
|
|
1643
1257
|
<!-- default child "Interface" -->
|
|
1644
1258
|
|
|
1259
|
+
### TextFormDataRequestField
|
|
1645
1260
|
|
|
1646
|
-
|
|
1647
|
-
### TextFormDataRequestField
|
|
1648
1261
|
<!-- default child "Interface" -->
|
|
1649
|
-
Represents a plain text field. No filename and content type is set.
|
|
1650
1262
|
|
|
1263
|
+
Represents a plain text field. No filename and content type is set.
|
|
1651
1264
|
|
|
1652
1265
|
#### Properties
|
|
1653
1266
|
|
|
@@ -1659,11 +1272,8 @@ The name of the field.
|
|
|
1659
1272
|
|
|
1660
1273
|
</div>
|
|
1661
1274
|
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
1275
|
</div>
|
|
1665
1276
|
|
|
1666
|
-
|
|
1667
1277
|
<div class="padding-left--md padding-bottom--md">
|
|
1668
1278
|
<strong>type</strong>: "text"
|
|
1669
1279
|
<div class="padding-left--md">
|
|
@@ -1672,11 +1282,8 @@ A plain text field type discriminator.
|
|
|
1672
1282
|
|
|
1673
1283
|
</div>
|
|
1674
1284
|
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
1285
|
</div>
|
|
1678
1286
|
|
|
1679
|
-
|
|
1680
1287
|
<div class="padding-left--md padding-bottom--md">
|
|
1681
1288
|
<strong>value</strong>: <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a>
|
|
1682
1289
|
<div class="padding-left--md">
|
|
@@ -1685,64 +1292,42 @@ The field's value.
|
|
|
1685
1292
|
|
|
1686
1293
|
</div>
|
|
1687
1294
|
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
1295
|
</div>
|
|
1691
1296
|
|
|
1297
|
+
### TextFormDataResponseField
|
|
1692
1298
|
|
|
1693
|
-
|
|
1694
|
-
### TextFormDataResponseField
|
|
1695
1299
|
<!-- default child "Interface" -->
|
|
1696
1300
|
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
1301
|
#### Properties
|
|
1700
1302
|
|
|
1701
1303
|
<div class="padding-left--md padding-bottom--md">
|
|
1702
1304
|
<strong>name</strong>: <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a>
|
|
1703
1305
|
<div class="padding-left--md">
|
|
1704
1306
|
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
1307
|
</div>
|
|
1708
1308
|
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
1309
|
</div>
|
|
1712
1310
|
|
|
1713
|
-
|
|
1714
1311
|
<div class="padding-left--md padding-bottom--md">
|
|
1715
1312
|
<strong>type</strong>: "text"
|
|
1716
1313
|
<div class="padding-left--md">
|
|
1717
1314
|
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
1315
|
</div>
|
|
1721
1316
|
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
1317
|
</div>
|
|
1725
1318
|
|
|
1726
|
-
|
|
1727
1319
|
<div class="padding-left--md padding-bottom--md">
|
|
1728
1320
|
<strong>value</strong>: <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a>
|
|
1729
1321
|
<div class="padding-left--md">
|
|
1730
1322
|
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
1323
|
</div>
|
|
1734
1324
|
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
1325
|
</div>
|
|
1738
1326
|
|
|
1327
|
+
### UnsupportedOperationError
|
|
1739
1328
|
|
|
1740
|
-
|
|
1741
|
-
### UnsupportedOperationError
|
|
1742
1329
|
<!-- default child "Interface" -->
|
|
1743
1330
|
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
1331
|
#### Properties
|
|
1747
1332
|
|
|
1748
1333
|
<div class="padding-left--md padding-bottom--md">
|
|
@@ -1753,11 +1338,8 @@ The error root cause.
|
|
|
1753
1338
|
|
|
1754
1339
|
</div>
|
|
1755
1340
|
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
1341
|
</div>
|
|
1759
1342
|
|
|
1760
|
-
|
|
1761
1343
|
<div class="padding-left--md padding-bottom--md">
|
|
1762
1344
|
<strong>name</strong>: "UnsupportedOperationError"
|
|
1763
1345
|
<div class="padding-left--md">
|
|
@@ -1766,48 +1348,30 @@ The error name.
|
|
|
1766
1348
|
|
|
1767
1349
|
</div>
|
|
1768
1350
|
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
1351
|
</div>
|
|
1772
1352
|
|
|
1773
|
-
|
|
1774
1353
|
## Variables
|
|
1775
1354
|
|
|
1776
1355
|
<div class="padding-left--md padding-bottom--md">
|
|
1777
1356
|
<strong>PlatformAbortController</strong>: Object
|
|
1778
1357
|
<div class="padding-left--md">
|
|
1779
1358
|
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
1359
|
</div>
|
|
1783
1360
|
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
1361
|
</div>
|
|
1787
1362
|
|
|
1788
|
-
|
|
1789
1363
|
<div class="padding-left--md padding-bottom--md">
|
|
1790
1364
|
<strong>PlatformAbortSignal</strong>: Object
|
|
1791
1365
|
<div class="padding-left--md">
|
|
1792
1366
|
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
1367
|
</div>
|
|
1796
1368
|
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
1369
|
</div>
|
|
1800
1370
|
|
|
1801
|
-
|
|
1802
1371
|
<div class="padding-left--md padding-bottom--md">
|
|
1803
1372
|
<strong>httpClient</strong>: <a href="#httpclient">HttpClient</a>
|
|
1804
1373
|
<div class="padding-left--md">
|
|
1805
1374
|
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
1375
|
</div>
|
|
1809
1376
|
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
1377
|
</div>
|
|
1813
|
-
|