@dynatrace-sdk/http-client 1.4.0 → 1.5.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.
Files changed (48) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/cjs/index.js +32 -14
  3. package/docs/DOCS.md +101 -97
  4. package/esm/index.js +29 -11
  5. package/esm/package.json +3 -0
  6. package/package.json +13 -2
  7. package/types/index.d.ts +617 -1
  8. package/types/packages/http-client/src/index.d.ts +0 -2
  9. package/types/packages/http-client/src/lib/platform/abort-controller.d.ts +0 -6
  10. package/types/packages/http-client/src/lib/platform/abort-signal.d.ts +0 -6
  11. package/types/packages/http-client/src/lib/platform/apply-content-type-header.d.ts +0 -2
  12. package/types/packages/http-client/src/lib/platform/base-error.d.ts +0 -5
  13. package/types/packages/http-client/src/lib/platform/binary.d.ts +0 -13
  14. package/types/packages/http-client/src/lib/platform/data-type-error.d.ts +0 -6
  15. package/types/packages/http-client/src/lib/platform/decode-form-data.d.ts +0 -48
  16. package/types/packages/http-client/src/lib/platform/decode-response-body.d.ts +0 -3
  17. package/types/packages/http-client/src/lib/platform/default-status-validator.d.ts +0 -2
  18. package/types/packages/http-client/src/lib/platform/encode-request-body.d.ts +0 -2
  19. package/types/packages/http-client/src/lib/platform/http-client-abort-error.d.ts +0 -7
  20. package/types/packages/http-client/src/lib/platform/http-client-request-error.d.ts +0 -7
  21. package/types/packages/http-client/src/lib/platform/http-client-response-error-serializer.d.ts +0 -3
  22. package/types/packages/http-client/src/lib/platform/http-client-response-error.d.ts +0 -11
  23. package/types/packages/http-client/src/lib/platform/http-client-response.d.ts +0 -10
  24. package/types/packages/http-client/src/lib/platform/http-client.d.ts +0 -24
  25. package/types/packages/http-client/src/lib/platform/index.d.ts +0 -12
  26. package/types/packages/http-client/src/lib/platform/oauth-http-client.d.ts +0 -41
  27. package/types/packages/http-client/src/lib/platform/unsupported-operation-error.d.ts +0 -6
  28. package/types/packages/http-client/src/lib/types/abort-controller.d.ts +0 -14
  29. package/types/packages/http-client/src/lib/types/abort-signal.d.ts +0 -18
  30. package/types/packages/http-client/src/lib/types/base-error.d.ts +0 -4
  31. package/types/packages/http-client/src/lib/types/binary.d.ts +0 -15
  32. package/types/packages/http-client/src/lib/types/data-type-error.d.ts +0 -14
  33. package/types/packages/http-client/src/lib/types/data-types.d.ts +0 -36
  34. package/types/packages/http-client/src/lib/types/form-data-request-body.d.ts +0 -83
  35. package/types/packages/http-client/src/lib/types/form-data-response-body.d.ts +0 -15
  36. package/types/packages/http-client/src/lib/types/headers.d.ts +0 -6
  37. package/types/packages/http-client/src/lib/types/http-client-abort-error.d.ts +0 -15
  38. package/types/packages/http-client/src/lib/types/http-client-network-error.d.ts +0 -15
  39. package/types/packages/http-client/src/lib/types/http-client-request-error.d.ts +0 -15
  40. package/types/packages/http-client/src/lib/types/http-client-request-options.d.ts +0 -42
  41. package/types/packages/http-client/src/lib/types/http-client-response-error.d.ts +0 -20
  42. package/types/packages/http-client/src/lib/types/http-client-response.d.ts +0 -33
  43. package/types/packages/http-client/src/lib/types/http-client.d.ts +0 -24
  44. package/types/packages/http-client/src/lib/types/index.d.ts +0 -20
  45. package/types/packages/http-client/src/lib/types/request-body-types.d.ts +0 -26
  46. package/types/packages/http-client/src/lib/types/response-body-types.d.ts +0 -46
  47. package/types/packages/http-client/src/lib/types/status-validator.d.ts +0 -7
  48. package/types/packages/http-client/src/lib/types/unsupported-operation-error.d.ts +0 -14
package/docs/DOCS.md CHANGED
@@ -4,8 +4,6 @@ description: An environment agnostic (browser/deno vs nodejs) abstraction layer
4
4
  ---
5
5
 
6
6
 
7
- # @dynatrace-sdk/http-client
8
-
9
7
  An environment agnostic (browser/deno vs nodejs) abstraction layer for making HTTP calls.
10
8
 
11
9
  import NpmLogo from '@site/static/img/npm-logo.png';
@@ -15,7 +13,7 @@ import NpmLogo from '@site/static/img/npm-logo.png';
15
13
  <a href="https://www.npmjs.com/package/@dynatrace-sdk/http-client" target="_blank" rel="noopener noreferrer"> <span class="margin-right--xs">@dynatrace-sdk/http-client</span> <img className="no-zoom" width="20px" src={NpmLogo} /> </a>
16
14
  </div>
17
15
  <div class="col" style={{textAlign: 'right'}}>
18
- <a href="https://www.npmjs.com/package/@dynatrace-sdk/http-client/v/1.4.0" target="_blank" rel="noopener noreferrer">v1.4.0</a>
16
+ <a href="https://www.npmjs.com/package/@dynatrace-sdk/http-client/v/1.5.2" target="_blank" rel="noopener noreferrer">v1.5.2</a>
19
17
  </div>
20
18
  </div>
21
19
 
@@ -39,8 +37,8 @@ npm install @dynatrace-sdk/http-client
39
37
 
40
38
  | Name | Type |
41
39
  | --- | --- |
42
- |message<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
43
- |cause|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|
40
+ |message<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
41
+ |cause|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|
44
42
 
45
43
 
46
44
 
@@ -53,7 +51,7 @@ npm install @dynatrace-sdk/http-client
53
51
 
54
52
  | Name | Type | Description |
55
53
  | --- | --- | --- |
56
- |cause|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)| |
54
+ |cause|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)||
57
55
 
58
56
 
59
57
  ### PlatformBinary
@@ -64,7 +62,7 @@ Represents an environment agnostic (browser vs node) abstraction layer for binar
64
62
 
65
63
  | Name | Type |
66
64
  | --- | --- |
67
- |data<sup>*required</sup>|ArrayBuffer &#124; Blob &#124; ReadableStream&lt;Uint8Array&gt;|
65
+ |data<sup>*required</sup>|ArrayBuffer &#124; Blob &#124; ReadableStream&lt;Uint8Array&gt;|
68
66
 
69
67
  #### Methods
70
68
 
@@ -88,7 +86,7 @@ Returns the binary data in a form that conforms to the specified type.
88
86
 
89
87
  | Name | Type | Description |
90
88
  | --- | --- | --- |
91
- |type<sup>*required</sup>|T|<p>The type of the data. Can be <code>text</code>, <code>json</code>, <code>array-buffer</code>, <code>blob</code>, <code>readable-stream</code>, <code>buffer</code> or <code>stream</code>.</p> |
89
+ |type<sup>*required</sup>|T|<p>The type of the data. Can be <code>text</code>, <code>json</code>, <code>array-buffer</code>, <code>blob</code>, <code>readable-stream</code>, <code>buffer</code> or <code>stream</code>.</p> |
92
90
 
93
91
 
94
92
 
@@ -128,7 +126,7 @@ Returns the binary data in a form that conforms to the specified type.
128
126
 
129
127
  | Name | Type |
130
128
  | --- | --- |
131
- |data<sup>*required</sup>|ArrayBuffer &#124; Blob &#124; ReadableStream&lt;Uint8Array&gt; &#124; Buffer &#124; Readable|
129
+ |data<sup>*required</sup>|ArrayBuffer &#124; Blob &#124; ReadableStream&lt;Uint8Array&gt; &#124; Buffer &#124; Readable|
132
130
 
133
131
 
134
132
 
@@ -161,7 +159,7 @@ Returns the binary data in a form that conforms to the specified type.
161
159
 
162
160
  | Name | Type |
163
161
  | --- | --- |
164
- |json<sup>*required</sup>|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|
162
+ |json<sup>*required</sup>|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|
165
163
 
166
164
 
167
165
 
@@ -194,7 +192,7 @@ Returns the binary data in a form that conforms to the specified type.
194
192
 
195
193
  | Name | Type |
196
194
  | --- | --- |
197
- |text<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
195
+ |text<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
198
196
 
199
197
 
200
198
 
@@ -221,8 +219,8 @@ Returns the binary data in a form that conforms to the specified type.
221
219
 
222
220
  | Name | Type |
223
221
  | --- | --- |
224
- |message<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
225
- |cause|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|
222
+ |message<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
223
+ |cause|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|
226
224
 
227
225
 
228
226
 
@@ -235,8 +233,8 @@ Returns the binary data in a form that conforms to the specified type.
235
233
 
236
234
  | Name | Type | Description |
237
235
  | --- | --- | --- |
238
- |cause|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|The error root cause. |
239
- |name<sup>*required</sup>|"DataTypeError"|The error name. |
236
+ |cause|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|The error root cause.|
237
+ |name<sup>*required</sup>|"DataTypeError"|The error name.|
240
238
 
241
239
 
242
240
  ### PlatformHttpClient
@@ -255,7 +253,7 @@ Currently, only the requests to the Platform Services and the Serverless Functio
255
253
 
256
254
  | Name | Type |
257
255
  | --- | --- |
258
- |options|HttpClientConfiguration|
256
+ |options|HttpClientConfiguration|
259
257
 
260
258
 
261
259
 
@@ -268,8 +266,8 @@ Currently, only the requests to the Platform Services and the Serverless Functio
268
266
 
269
267
  | Name | Type |
270
268
  | --- | --- |
271
- |_baseUrl<sup>*required</sup>|undefined &#124; [string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
272
- |_defaultHeaders<sup>*required</sup>|undefined &#124; [Headers](#headers)|
269
+ |_baseUrl<sup>*required</sup>|undefined &#124; [string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
270
+ |_defaultHeaders<sup>*required</sup>|undefined &#124; [Headers](#headers)|
273
271
 
274
272
  #### Methods
275
273
 
@@ -299,7 +297,7 @@ when one of the following situations happen:
299
297
 
300
298
  | Name | Type | Description |
301
299
  | --- | --- | --- |
302
- |options<sup>*required</sup>|[HttpClientRequestOptions](#httpclientrequestoptions)&lt;T&gt;|Options used to configure the request. |
300
+ |options<sup>*required</sup>|[HttpClientRequestOptions](#httpclientrequestoptions)&lt;T&gt;|Options used to configure the request.|
303
301
 
304
302
 
305
303
 
@@ -332,7 +330,7 @@ Represents a situation when the request was aborted.
332
330
 
333
331
  | Name | Type |
334
332
  | --- | --- |
335
- |cause<sup>*required</sup>|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|
333
+ |cause<sup>*required</sup>|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|
336
334
 
337
335
 
338
336
 
@@ -345,8 +343,8 @@ Represents a situation when the request was aborted.
345
343
 
346
344
  | Name | Type | Description |
347
345
  | --- | --- | --- |
348
- |cause<sup>*required</sup>|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|The error root cause. |
349
- |name<sup>*required</sup>|"AbortError"|The error name. |
346
+ |cause<sup>*required</sup>|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|The error root cause.|
347
+ |name<sup>*required</sup>|"AbortError"|The error name.|
350
348
 
351
349
 
352
350
  ### PlatformHttpClientRequestError
@@ -362,7 +360,7 @@ Represents a situation when the request is invalid and cannot be sent.
362
360
 
363
361
  | Name | Type |
364
362
  | --- | --- |
365
- |cause<sup>*required</sup>|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|
363
+ |cause<sup>*required</sup>|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|
366
364
 
367
365
 
368
366
 
@@ -375,8 +373,8 @@ Represents a situation when the request is invalid and cannot be sent.
375
373
 
376
374
  | Name | Type | Description |
377
375
  | --- | --- | --- |
378
- |cause<sup>*required</sup>|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|The error root cause. |
379
- |name<sup>*required</sup>|"RequestError"|The error name. |
376
+ |cause<sup>*required</sup>|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|The error root cause.|
377
+ |name<sup>*required</sup>|"RequestError"|The error name.|
380
378
 
381
379
 
382
380
  ### PlatformHttpClientResponse
@@ -385,14 +383,16 @@ Represents the response to a request.
385
383
 
386
384
  #### Constructors
387
385
 
388
- ##### new PlatformHttpClientResponse(response)
386
+ ##### new PlatformHttpClientResponse(response,data?)
389
387
  <div class="padding-left--md">
390
388
 
391
389
  #### Parameters
392
390
 
393
391
  | Name | Type |
394
392
  | --- | --- |
395
- |response<sup>*required</sup>|Response|
393
+ |response<sup>*required</sup>|Response|
394
+ |data|\{ requestUrl \}|
395
+ |data.requestUrl<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
396
396
 
397
397
 
398
398
 
@@ -403,9 +403,10 @@ Represents the response to a request.
403
403
 
404
404
  #### Properties
405
405
 
406
- | Name | Type |
407
- | --- | --- |
408
- |response<sup>*required</sup>|Response|
406
+ | Name | Type | Description |
407
+ | --- | --- | --- |
408
+ |requestUrl<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The URL that was originally requested, before any redirects were followed.|
409
+ |response<sup>*required</sup>|Response||
409
410
 
410
411
  #### Accessors
411
412
 
@@ -422,7 +423,8 @@ The status message corresponding to the status code.
422
423
 
423
424
 
424
425
  ##### url
425
- The URL of the response.
426
+ The URL of the response. May differ from `requestUrl` if the request was
427
+ redirected.
426
428
 
427
429
 
428
430
  #### Methods
@@ -447,7 +449,7 @@ Returns the response body in a form that conforms to the specified response body
447
449
 
448
450
  | Name | Type | Description |
449
451
  | --- | --- | --- |
450
- |responseBodyType<sup>*required</sup>|T|<p>The type of the response body. Can be <code>text</code>, <code>json</code>, <code>binary</code>, <code>form-data</code>, <code>array-buffer</code>, <code>blob</code>, <code>readable-stream</code>, <code>buffer</code> or <code>stream</code>. The default response body type is <code>json</code>.</p> |
452
+ |responseBodyType<sup>*required</sup>|T|<p>The type of the response body. Can be <code>text</code>, <code>json</code>, <code>binary</code>, <code>form-data</code>, <code>array-buffer</code>, <code>blob</code>, <code>readable-stream</code>, <code>buffer</code> or <code>stream</code>. The default response body type is <code>json</code>.</p> |
451
453
 
452
454
 
453
455
 
@@ -481,9 +483,10 @@ Represents a situation when the response status is considered invalid by the sta
481
483
 
482
484
  | Name | Type |
483
485
  | --- | --- |
484
- |response<sup>*required</sup>|Response|
485
- |data|\{ requestMethod \}|
486
- |data.requestMethod|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
486
+ |response<sup>*required</sup>|Response|
487
+ |data|\{ requestMethod, requestUrl \}|
488
+ |data.requestMethod|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
489
+ |data.requestUrl|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
487
490
 
488
491
 
489
492
 
@@ -496,10 +499,10 @@ Represents a situation when the response status is considered invalid by the sta
496
499
 
497
500
  | Name | Type | Description |
498
501
  | --- | --- | --- |
499
- |cause|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|The error root cause. |
500
- |name<sup>*required</sup>|"ResponseError"|The error name. |
501
- |requestMethod|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |
502
- |response<sup>*required</sup>|[HttpClientResponse](#httpclientresponse)|The response. |
502
+ |cause|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|The error root cause.|
503
+ |name<sup>*required</sup>|"ResponseError"|The error name.|
504
+ |requestMethod|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)||
505
+ |response<sup>*required</sup>|[HttpClientResponse](#httpclientresponse)|The response.|
503
506
 
504
507
 
505
508
  ### PlatformUnsupportedOperationError
@@ -515,8 +518,8 @@ Represents a situation when the response status is considered invalid by the sta
515
518
 
516
519
  | Name | Type |
517
520
  | --- | --- |
518
- |message<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
519
- |cause|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|
521
+ |message<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
522
+ |cause|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|
520
523
 
521
524
 
522
525
 
@@ -529,8 +532,8 @@ Represents a situation when the response status is considered invalid by the sta
529
532
 
530
533
  | Name | Type | Description |
531
534
  | --- | --- | --- |
532
- |cause|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|The error root cause. |
533
- |name<sup>*required</sup>|"UnsupportedOperationError"|The error name. |
535
+ |cause|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|The error root cause.|
536
+ |name<sup>*required</sup>|"UnsupportedOperationError"|The error name.|
534
537
 
535
538
 
536
539
  ## Functions
@@ -555,7 +558,7 @@ Represents a situation when the response status is considered invalid by the sta
555
558
 
556
559
  | Name | Type |
557
560
  | --- | --- |
558
- |e<sup>*required</sup>|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|
561
+ |e<sup>*required</sup>|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|
559
562
 
560
563
 
561
564
 
@@ -588,7 +591,7 @@ Represents a situation when the response status is considered invalid by the sta
588
591
 
589
592
  | Name | Type |
590
593
  | --- | --- |
591
- |e<sup>*required</sup>|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|
594
+ |e<sup>*required</sup>|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|
592
595
 
593
596
 
594
597
 
@@ -621,7 +624,7 @@ Represents a situation when the response status is considered invalid by the sta
621
624
 
622
625
  | Name | Type |
623
626
  | --- | --- |
624
- |e<sup>*required</sup>|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|
627
+ |e<sup>*required</sup>|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|
625
628
 
626
629
 
627
630
 
@@ -654,7 +657,7 @@ Represents a situation when the response status is considered invalid by the sta
654
657
 
655
658
  | Name | Type |
656
659
  | --- | --- |
657
- |e<sup>*required</sup>|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|
660
+ |e<sup>*required</sup>|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|
658
661
 
659
662
 
660
663
 
@@ -715,7 +718,7 @@ Represents a controller object that allows to abort one or more requests as and
715
718
 
716
719
  | Name | Type | Description |
717
720
  | --- | --- | --- |
718
- |signal<sup>*required</sup>|AbortSignal|Returns an AbortSignal object instance, which can be used to communicate with a request. |
721
+ |signal<sup>*required</sup>|AbortSignal|Returns an AbortSignal object instance, which can be used to communicate with a request.|
719
722
 
720
723
  #### Methods
721
724
 
@@ -753,8 +756,8 @@ Aborts a request before it has completed.
753
756
 
754
757
  | Name | Type |
755
758
  | --- | --- |
756
- |cause|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|
757
- |name<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
759
+ |cause|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|
760
+ |name<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
758
761
 
759
762
 
760
763
  ### Binary
@@ -783,7 +786,7 @@ Returns the binary data in a form that conforms to the specified type.
783
786
 
784
787
  | Name | Type | Description |
785
788
  | --- | --- | --- |
786
- |type<sup>*required</sup>|T|<p>The type of the data. Can be <code>text</code>, <code>json</code>, <code>array-buffer</code>, <code>blob</code>, <code>readable-stream</code>, <code>buffer</code> or <code>stream</code>.</p> |
789
+ |type<sup>*required</sup>|T|<p>The type of the data. Can be <code>text</code>, <code>json</code>, <code>array-buffer</code>, <code>blob</code>, <code>readable-stream</code>, <code>buffer</code> or <code>stream</code>.</p> |
787
790
 
788
791
 
789
792
 
@@ -812,11 +815,11 @@ Represents an binary field.
812
815
 
813
816
  | Name | Type | Description |
814
817
  | --- | --- | --- |
815
- |contentType|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|<p>The content type of the data contained in <code>value</code>. The default content type for the binary is 'application/octet-stream'.</p> |
816
- |filename|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|<p>The filename reported to the server. The default filename for the binary is 'binary'.</p> |
817
- |name<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The name of the field. |
818
- |type<sup>*required</sup>|"binary"|A binary field type discriminator. |
819
- |value<sup>*required</sup>|ArrayBuffer &#124; Blob &#124; Buffer &#124; Readable &#124; [Binary](#binary) &#124; ReadableStream&lt;[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)&gt; &#124; File|The field's value. |
818
+ |contentType|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|<p>The content type of the data contained in <code>value</code>. The default content type for the binary is 'application/octet-stream'.</p> |
819
+ |filename|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|<p>The filename reported to the server. The default filename for the binary is 'binary'.</p> |
820
+ |name<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The name of the field.|
821
+ |type<sup>*required</sup>|"binary"|A binary field type discriminator.|
822
+ |value<sup>*required</sup>|ArrayBuffer &#124; Blob &#124; Buffer &#124; Readable &#124; [Binary](#binary) &#124; ReadableStream&lt;[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)&gt; &#124; File|The field's value.|
820
823
 
821
824
 
822
825
  ### BinaryFormDataResponseField
@@ -827,11 +830,11 @@ Represents an binary field.
827
830
 
828
831
  | Name | Type |
829
832
  | --- | --- |
830
- |contentType<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
831
- |filename<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
832
- |name<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
833
- |type<sup>*required</sup>|"binary"|
834
- |value<sup>*required</sup>|[Binary](#binary)|
833
+ |contentType<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
834
+ |filename<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
835
+ |name<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
836
+ |type<sup>*required</sup>|"binary"|
837
+ |value<sup>*required</sup>|[Binary](#binary)|
835
838
 
836
839
 
837
840
  ### DataTypeError
@@ -842,8 +845,8 @@ Represents an binary field.
842
845
 
843
846
  | Name | Type | Description |
844
847
  | --- | --- | --- |
845
- |cause|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|The error root cause. |
846
- |name<sup>*required</sup>|"DataTypeError"|The error name. |
848
+ |cause|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|The error root cause.|
849
+ |name<sup>*required</sup>|"DataTypeError"|The error name.|
847
850
 
848
851
 
849
852
  ### Headers
@@ -885,7 +888,7 @@ when one of the following situations happen:
885
888
 
886
889
  | Name | Type | Description |
887
890
  | --- | --- | --- |
888
- |options<sup>*required</sup>|[HttpClientRequestOptions](#httpclientrequestoptions)&lt;T&gt;|Options used to configure the request. |
891
+ |options<sup>*required</sup>|[HttpClientRequestOptions](#httpclientrequestoptions)&lt;T&gt;|Options used to configure the request.|
889
892
 
890
893
 
891
894
 
@@ -913,8 +916,8 @@ Represents a situation when the request was aborted.
913
916
 
914
917
  | Name | Type | Description |
915
918
  | --- | --- | --- |
916
- |cause|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|The error root cause. |
917
- |name<sup>*required</sup>|"AbortError"|The error name. |
919
+ |cause|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|The error root cause.|
920
+ |name<sup>*required</sup>|"AbortError"|The error name.|
918
921
 
919
922
 
920
923
  ### HttpClientNetworkError
@@ -925,8 +928,8 @@ Represents a situation when a network error occurred.
925
928
 
926
929
  | Name | Type | Description |
927
930
  | --- | --- | --- |
928
- |cause|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|The error root cause. |
929
- |name<sup>*required</sup>|"NetworkError"|The error name. |
931
+ |cause|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|The error root cause.|
932
+ |name<sup>*required</sup>|"NetworkError"|The error name.|
930
933
 
931
934
 
932
935
  ### HttpClientRequestError
@@ -937,8 +940,8 @@ Represents a situation when the request is invalid and cannot be sent.
937
940
 
938
941
  | Name | Type | Description |
939
942
  | --- | --- | --- |
940
- |cause|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|The error root cause. |
941
- |name<sup>*required</sup>|"RequestError"|The error name. |
943
+ |cause|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|The error root cause.|
944
+ |name<sup>*required</sup>|"RequestError"|The error name.|
942
945
 
943
946
 
944
947
  ### HttpClientRequestOptions
@@ -949,12 +952,12 @@ Represents the options used to configure the request.
949
952
 
950
953
  | Name | Type | Description |
951
954
  | --- | --- | --- |
952
- |body|RequestBodyTypes&lt;T&gt;|<p>A request body that will be send along with the request. The structure of the request body needs to conform to the specified request body type.</p> |
953
- |headers|[Headers](#headers)|The request headers. |
954
- |method|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The request method, e.g. <code>GET</code>, <code>POST</code>. |
955
- |requestBodyType|T|<p>The type of the request body. Can be <code>text</code>, <code>json</code>, <code>binary</code> or <code>form-data</code>. The default request body type is <code>json</code>.</p> |
956
- |statusValidator|[StatusValidator](#statusvalidator)|<p>A custom status validator function. If the status validator function returns <code>true</code> the returned promise resolves with the <code>HttpClientResponse</code> Otherwise the promise rejects with the <code>StatusError</code>. The default status validator function considers the <code>2xx</code> status codes as valid.</p> |
957
- |url<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The URL of the resource to fetch. |
955
+ |body|RequestBodyTypes&lt;T&gt;|<p>A request body that will be send along with the request. The structure of the request body needs to conform to the specified request body type.</p> |
956
+ |headers|[Headers](#headers)|The request headers.|
957
+ |method|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The request method, e.g. <code>GET</code>, <code>POST</code>.|
958
+ |requestBodyType|T|<p>The type of the request body. Can be <code>text</code>, <code>json</code>, <code>binary</code> or <code>form-data</code>. The default request body type is <code>json</code>.</p> |
959
+ |statusValidator|[StatusValidator](#statusvalidator)|<p>A custom status validator function. If the status validator function returns <code>true</code> the returned promise resolves with the <code>HttpClientResponse</code> Otherwise the promise rejects with the <code>StatusError</code>. The default status validator function considers the <code>2xx</code> status codes as valid.</p> |
960
+ |url<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The URL of the resource to fetch.|
958
961
 
959
962
 
960
963
  ### HttpClientResponse
@@ -965,10 +968,11 @@ Represents the response to a request.
965
968
 
966
969
  | Name | Type | Description |
967
970
  | --- | --- | --- |
968
- |headers<sup>*required</sup>|[Headers](#headers)|The response headers. |
969
- |status<sup>*required</sup>|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|The status code of the response. |
970
- |statusText<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The status message corresponding to the status code. |
971
- |url<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The URL of the response. |
971
+ |headers<sup>*required</sup>|[Headers](#headers)|The response headers.|
972
+ |requestUrl<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The URL that was originally requested, before any redirects were followed.|
973
+ |status<sup>*required</sup>|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|The status code of the response.|
974
+ |statusText<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The status message corresponding to the status code.|
975
+ |url<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|<p>The URL of the response. May differ from <code>requestUrl</code> if the request was redirected.</p> |
972
976
 
973
977
  #### Methods
974
978
 
@@ -992,7 +996,7 @@ Returns the response body in a form that conforms to the specified response body
992
996
 
993
997
  | Name | Type | Description |
994
998
  | --- | --- | --- |
995
- |responseBodyType|T|<p>The type of the response body. Can be <code>text</code>, <code>json</code>, <code>binary</code>, <code>form-data</code>, <code>array-buffer</code>, <code>blob</code>, <code>readable-stream</code>, <code>buffer</code> or <code>stream</code>. The default response body type is <code>json</code>.</p> |
999
+ |responseBodyType|T|<p>The type of the response body. Can be <code>text</code>, <code>json</code>, <code>binary</code>, <code>form-data</code>, <code>array-buffer</code>, <code>blob</code>, <code>readable-stream</code>, <code>buffer</code> or <code>stream</code>. The default response body type is <code>json</code>.</p> |
996
1000
 
997
1001
 
998
1002
 
@@ -1021,9 +1025,9 @@ Represents a situation when the response status is considered invalid by the sta
1021
1025
 
1022
1026
  | Name | Type | Description |
1023
1027
  | --- | --- | --- |
1024
- |cause|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|The error root cause. |
1025
- |name<sup>*required</sup>|"ResponseError"|The error name. |
1026
- |response<sup>*required</sup>|[HttpClientResponse](#httpclientresponse)|The response. |
1028
+ |cause|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|The error root cause.|
1029
+ |name<sup>*required</sup>|"ResponseError"|The error name.|
1030
+ |response<sup>*required</sup>|[HttpClientResponse](#httpclientresponse)|The response.|
1027
1031
 
1028
1032
 
1029
1033
  ### JsonFormDataRequestField
@@ -1034,11 +1038,11 @@ Represents a JSON field.
1034
1038
 
1035
1039
  | Name | Type | Description |
1036
1040
  | --- | --- | --- |
1037
- |contentType|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|<p>The content type of the data contained in <code>value</code>. The default content type for the JSON is 'application/json'.</p> |
1038
- |filename|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|<p>The filename reported to the server. The default filename for the JSON is 'json'.</p> |
1039
- |name<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The name of the field. |
1040
- |type<sup>*required</sup>|"json"|A JSON field type discriminator. |
1041
- |value<sup>*required</sup>|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|The field's value. |
1041
+ |contentType|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|<p>The content type of the data contained in <code>value</code>. The default content type for the JSON is 'application/json'.</p> |
1042
+ |filename|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|<p>The filename reported to the server. The default filename for the JSON is 'json'.</p> |
1043
+ |name<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The name of the field.|
1044
+ |type<sup>*required</sup>|"json"|A JSON field type discriminator.|
1045
+ |value<sup>*required</sup>|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|The field's value.|
1042
1046
 
1043
1047
 
1044
1048
  ### StatusValidator
@@ -1054,9 +1058,9 @@ Represents a plain text field. No filename and content type is set.
1054
1058
 
1055
1059
  | Name | Type | Description |
1056
1060
  | --- | --- | --- |
1057
- |name<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The name of the field. |
1058
- |type<sup>*required</sup>|"text"|A plain text field type discriminator. |
1059
- |value<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The field's value. |
1061
+ |name<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The name of the field.|
1062
+ |type<sup>*required</sup>|"text"|A plain text field type discriminator.|
1063
+ |value<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The field's value.|
1060
1064
 
1061
1065
 
1062
1066
  ### TextFormDataResponseField
@@ -1067,9 +1071,9 @@ Represents a plain text field. No filename and content type is set.
1067
1071
 
1068
1072
  | Name | Type |
1069
1073
  | --- | --- |
1070
- |name<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
1071
- |type<sup>*required</sup>|"text"|
1072
- |value<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
1074
+ |name<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
1075
+ |type<sup>*required</sup>|"text"|
1076
+ |value<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
1073
1077
 
1074
1078
 
1075
1079
  ### UnsupportedOperationError
@@ -1080,7 +1084,7 @@ Represents a plain text field. No filename and content type is set.
1080
1084
 
1081
1085
  | Name | Type | Description |
1082
1086
  | --- | --- | --- |
1083
- |cause|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|The error root cause. |
1084
- |name<sup>*required</sup>|"UnsupportedOperationError"|The error name. |
1087
+ |cause|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|The error root cause.|
1088
+ |name<sup>*required</sup>|"UnsupportedOperationError"|The error name.|
1085
1089
 
1086
1090