@dynatrace-sdk/http-client 1.5.1 → 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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,18 @@
2
2
 
3
3
  @dynatrace-sdk/http-client
4
4
 
5
+ ## 1.5.2
6
+
7
+ ### Patch Changes
8
+
9
+ - Published packages now include an `exports` map in their `package.json` (with `types`, `require` and `import` conditions), so Node.js resolves the `esm/` output as native ES modules. Previously the `module` field was only honoured by bundlers, so the `type: module` marker in `esm/package.json` had no effect in plain Node.js ESM resolution. Deep imports into `cjs/`, `esm/` or `types/` that are not listed in the map are no longer permitted.
10
+ - A `package.json` containing `{"type":"module"}` is now emitted into the `esm/` output directory of each published package. This allows Node.js and bundlers to correctly identify the ESM output as ES modules without requiring the `.mjs` file extension.
11
+ - Updated dependencies
12
+
13
+ - Updated dependencies
14
+
15
+ - @dynatrace-sdk/error-handlers@1.3.3
16
+
5
17
  ## 1.5.1
6
18
 
7
19
  ### Patch Changes
package/cjs/index.js CHANGED
@@ -33,8 +33,8 @@ var __copyProps = (to, from, except, desc) => {
33
33
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
34
34
 
35
35
  // packages/http-client/src/index.ts
36
- var src_exports = {};
37
- __export(src_exports, {
36
+ var index_exports = {};
37
+ __export(index_exports, {
38
38
  PlatformAbortController: () => AbortController,
39
39
  PlatformAbortSignal: () => AbortSignal,
40
40
  PlatformBaseError: () => BaseError,
@@ -53,7 +53,7 @@ __export(src_exports, {
53
53
  isHttpClientRequestError: () => isHttpClientRequestError,
54
54
  isHttpClientResponseError: () => isHttpClientResponseError
55
55
  });
56
- module.exports = __toCommonJS(src_exports);
56
+ module.exports = __toCommonJS(index_exports);
57
57
 
58
58
  // packages/http-client/src/lib/types/http-client-request-error.ts
59
59
  function isHttpClientRequestError(e) {
@@ -87,6 +87,7 @@ var BaseError = class extends Error {
87
87
  super(message);
88
88
  this.cause = cause;
89
89
  }
90
+ cause;
90
91
  };
91
92
 
92
93
  // packages/http-client/src/lib/platform/unsupported-operation-error.ts
@@ -118,6 +119,7 @@ var Binary = class _Binary {
118
119
  constructor(data) {
119
120
  this.data = data;
120
121
  }
122
+ data;
121
123
  static fromText(text) {
122
124
  return new _Binary(new Blob([text]));
123
125
  }
@@ -279,6 +281,7 @@ var HttpClientAbortError = class extends Error {
279
281
  );
280
282
  this.cause = cause;
281
283
  }
284
+ cause;
282
285
  name = "AbortError";
283
286
  };
284
287
  var throwIfAbortError = (e) => {
@@ -295,21 +298,20 @@ var HttpClientRequestError = class extends BaseError {
295
298
  );
296
299
  this.cause = cause;
297
300
  }
301
+ cause;
298
302
  name = "RequestError";
299
303
  };
300
304
 
301
305
  // packages/http-client/src/lib/platform/decode-form-data.ts
302
306
  function byteToChar(byte) {
303
- if (byte === void 0)
304
- return void 0;
307
+ if (byte === void 0) return void 0;
305
308
  return String.fromCharCode(byte);
306
309
  }
307
310
  function isTextContentType(contentType) {
308
311
  return ["application/json", "text/plain"].includes(String(contentType).toLowerCase());
309
312
  }
310
313
  function removeEscaping(value) {
311
- if (!value)
312
- return value;
314
+ if (!value) return value;
313
315
  return JSON.parse(`"${value}"`);
314
316
  }
315
317
  function parseContentDisposition(contentDisposition) {
@@ -329,6 +331,8 @@ var FormDataParser = class {
329
331
  this.sourceArray = sourceArray;
330
332
  this.boundary = boundary;
331
333
  }
334
+ sourceArray;
335
+ boundary;
332
336
  currentChar = null;
333
337
  currentByte = null;
334
338
  offset = 0;
@@ -640,6 +644,7 @@ var HttpClientResponse = class {
640
644
  this.response = response;
641
645
  this.requestUrl = data?.requestUrl ?? response.url;
642
646
  }
647
+ response;
643
648
  requestUrl;
644
649
  get url() {
645
650
  return this.response.url;
@@ -857,6 +862,7 @@ var OAuthHttpClient = class {
857
862
  constructor(config) {
858
863
  this.config = config;
859
864
  }
865
+ config;
860
866
  oauthToken;
861
867
  async send(options) {
862
868
  const { statusValidator = defaultStatusValidator } = options;
package/docs/DOCS.md CHANGED
@@ -13,7 +13,7 @@ import NpmLogo from '@site/static/img/npm-logo.png';
13
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>
14
14
  </div>
15
15
  <div class="col" style={{textAlign: 'right'}}>
16
- <a href="https://www.npmjs.com/package/@dynatrace-sdk/http-client/v/1.5.1" target="_blank" rel="noopener noreferrer">v1.5.1</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>
17
17
  </div>
18
18
  </div>
19
19
 
@@ -37,8 +37,8 @@ npm install @dynatrace-sdk/http-client
37
37
 
38
38
  | Name | Type |
39
39
  | --- | --- |
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)|
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)|
42
42
 
43
43
 
44
44
 
@@ -51,7 +51,7 @@ npm install @dynatrace-sdk/http-client
51
51
 
52
52
  | Name | Type | Description |
53
53
  | --- | --- | --- |
54
- |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)||
55
55
 
56
56
 
57
57
  ### PlatformBinary
@@ -62,7 +62,7 @@ Represents an environment agnostic (browser vs node) abstraction layer for binar
62
62
 
63
63
  | Name | Type |
64
64
  | --- | --- |
65
- |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;|
66
66
 
67
67
  #### Methods
68
68
 
@@ -86,7 +86,7 @@ Returns the binary data in a form that conforms to the specified type.
86
86
 
87
87
  | Name | Type | Description |
88
88
  | --- | --- | --- |
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> |
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> |
90
90
 
91
91
 
92
92
 
@@ -126,7 +126,7 @@ Returns the binary data in a form that conforms to the specified type.
126
126
 
127
127
  | Name | Type |
128
128
  | --- | --- |
129
- |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|
130
130
 
131
131
 
132
132
 
@@ -159,7 +159,7 @@ Returns the binary data in a form that conforms to the specified type.
159
159
 
160
160
  | Name | Type |
161
161
  | --- | --- |
162
- |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)|
163
163
 
164
164
 
165
165
 
@@ -192,7 +192,7 @@ Returns the binary data in a form that conforms to the specified type.
192
192
 
193
193
  | Name | Type |
194
194
  | --- | --- |
195
- |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)|
196
196
 
197
197
 
198
198
 
@@ -219,8 +219,8 @@ Returns the binary data in a form that conforms to the specified type.
219
219
 
220
220
  | Name | Type |
221
221
  | --- | --- |
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)|
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)|
224
224
 
225
225
 
226
226
 
@@ -233,8 +233,8 @@ Returns the binary data in a form that conforms to the specified type.
233
233
 
234
234
  | Name | Type | Description |
235
235
  | --- | --- | --- |
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. |
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.|
238
238
 
239
239
 
240
240
  ### PlatformHttpClient
@@ -253,7 +253,7 @@ Currently, only the requests to the Platform Services and the Serverless Functio
253
253
 
254
254
  | Name | Type |
255
255
  | --- | --- |
256
- |options|HttpClientConfiguration|
256
+ |options|HttpClientConfiguration|
257
257
 
258
258
 
259
259
 
@@ -266,8 +266,8 @@ Currently, only the requests to the Platform Services and the Serverless Functio
266
266
 
267
267
  | Name | Type |
268
268
  | --- | --- |
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)|
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)|
271
271
 
272
272
  #### Methods
273
273
 
@@ -297,7 +297,7 @@ when one of the following situations happen:
297
297
 
298
298
  | Name | Type | Description |
299
299
  | --- | --- | --- |
300
- |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.|
301
301
 
302
302
 
303
303
 
@@ -330,7 +330,7 @@ Represents a situation when the request was aborted.
330
330
 
331
331
  | Name | Type |
332
332
  | --- | --- |
333
- |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)|
334
334
 
335
335
 
336
336
 
@@ -343,8 +343,8 @@ Represents a situation when the request was aborted.
343
343
 
344
344
  | Name | Type | Description |
345
345
  | --- | --- | --- |
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. |
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.|
348
348
 
349
349
 
350
350
  ### PlatformHttpClientRequestError
@@ -360,7 +360,7 @@ Represents a situation when the request is invalid and cannot be sent.
360
360
 
361
361
  | Name | Type |
362
362
  | --- | --- |
363
- |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)|
364
364
 
365
365
 
366
366
 
@@ -373,8 +373,8 @@ Represents a situation when the request is invalid and cannot be sent.
373
373
 
374
374
  | Name | Type | Description |
375
375
  | --- | --- | --- |
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. |
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.|
378
378
 
379
379
 
380
380
  ### PlatformHttpClientResponse
@@ -390,9 +390,9 @@ Represents the response to a request.
390
390
 
391
391
  | Name | Type |
392
392
  | --- | --- |
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)|
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
 
@@ -405,8 +405,8 @@ Represents the response to a request.
405
405
 
406
406
  | Name | Type | Description |
407
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| |
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||
410
410
 
411
411
  #### Accessors
412
412
 
@@ -449,7 +449,7 @@ Returns the response body in a form that conforms to the specified response body
449
449
 
450
450
  | Name | Type | Description |
451
451
  | --- | --- | --- |
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> |
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> |
453
453
 
454
454
 
455
455
 
@@ -483,10 +483,10 @@ Represents a situation when the response status is considered invalid by the sta
483
483
 
484
484
  | Name | Type |
485
485
  | --- | --- |
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)|
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)|
490
490
 
491
491
 
492
492
 
@@ -499,10 +499,10 @@ Represents a situation when the response status is considered invalid by the sta
499
499
 
500
500
  | Name | Type | Description |
501
501
  | --- | --- | --- |
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. |
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.|
506
506
 
507
507
 
508
508
  ### PlatformUnsupportedOperationError
@@ -518,8 +518,8 @@ Represents a situation when the response status is considered invalid by the sta
518
518
 
519
519
  | Name | Type |
520
520
  | --- | --- |
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)|
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)|
523
523
 
524
524
 
525
525
 
@@ -532,8 +532,8 @@ Represents a situation when the response status is considered invalid by the sta
532
532
 
533
533
  | Name | Type | Description |
534
534
  | --- | --- | --- |
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. |
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.|
537
537
 
538
538
 
539
539
  ## Functions
@@ -558,7 +558,7 @@ Represents a situation when the response status is considered invalid by the sta
558
558
 
559
559
  | Name | Type |
560
560
  | --- | --- |
561
- |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)|
562
562
 
563
563
 
564
564
 
@@ -591,7 +591,7 @@ Represents a situation when the response status is considered invalid by the sta
591
591
 
592
592
  | Name | Type |
593
593
  | --- | --- |
594
- |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)|
595
595
 
596
596
 
597
597
 
@@ -624,7 +624,7 @@ Represents a situation when the response status is considered invalid by the sta
624
624
 
625
625
  | Name | Type |
626
626
  | --- | --- |
627
- |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)|
628
628
 
629
629
 
630
630
 
@@ -657,7 +657,7 @@ Represents a situation when the response status is considered invalid by the sta
657
657
 
658
658
  | Name | Type |
659
659
  | --- | --- |
660
- |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)|
661
661
 
662
662
 
663
663
 
@@ -718,7 +718,7 @@ Represents a controller object that allows to abort one or more requests as and
718
718
 
719
719
  | Name | Type | Description |
720
720
  | --- | --- | --- |
721
- |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.|
722
722
 
723
723
  #### Methods
724
724
 
@@ -756,8 +756,8 @@ Aborts a request before it has completed.
756
756
 
757
757
  | Name | Type |
758
758
  | --- | --- |
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)|
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)|
761
761
 
762
762
 
763
763
  ### Binary
@@ -786,7 +786,7 @@ Returns the binary data in a form that conforms to the specified type.
786
786
 
787
787
  | Name | Type | Description |
788
788
  | --- | --- | --- |
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> |
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> |
790
790
 
791
791
 
792
792
 
@@ -815,11 +815,11 @@ Represents an binary field.
815
815
 
816
816
  | Name | Type | Description |
817
817
  | --- | --- | --- |
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. |
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.|
823
823
 
824
824
 
825
825
  ### BinaryFormDataResponseField
@@ -830,11 +830,11 @@ Represents an binary field.
830
830
 
831
831
  | Name | Type |
832
832
  | --- | --- |
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)|
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)|
838
838
 
839
839
 
840
840
  ### DataTypeError
@@ -845,8 +845,8 @@ Represents an binary field.
845
845
 
846
846
  | Name | Type | Description |
847
847
  | --- | --- | --- |
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. |
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.|
850
850
 
851
851
 
852
852
  ### Headers
@@ -888,7 +888,7 @@ when one of the following situations happen:
888
888
 
889
889
  | Name | Type | Description |
890
890
  | --- | --- | --- |
891
- |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.|
892
892
 
893
893
 
894
894
 
@@ -916,8 +916,8 @@ Represents a situation when the request was aborted.
916
916
 
917
917
  | Name | Type | Description |
918
918
  | --- | --- | --- |
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. |
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.|
921
921
 
922
922
 
923
923
  ### HttpClientNetworkError
@@ -928,8 +928,8 @@ Represents a situation when a network error occurred.
928
928
 
929
929
  | Name | Type | Description |
930
930
  | --- | --- | --- |
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. |
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.|
933
933
 
934
934
 
935
935
  ### HttpClientRequestError
@@ -940,8 +940,8 @@ Represents a situation when the request is invalid and cannot be sent.
940
940
 
941
941
  | Name | Type | Description |
942
942
  | --- | --- | --- |
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. |
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.|
945
945
 
946
946
 
947
947
  ### HttpClientRequestOptions
@@ -952,12 +952,12 @@ Represents the options used to configure the request.
952
952
 
953
953
  | Name | Type | Description |
954
954
  | --- | --- | --- |
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. |
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.|
961
961
 
962
962
 
963
963
  ### HttpClientResponse
@@ -968,11 +968,11 @@ Represents the response to a request.
968
968
 
969
969
  | Name | Type | Description |
970
970
  | --- | --- | --- |
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> |
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> |
976
976
 
977
977
  #### Methods
978
978
 
@@ -996,7 +996,7 @@ Returns the response body in a form that conforms to the specified response body
996
996
 
997
997
  | Name | Type | Description |
998
998
  | --- | --- | --- |
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> |
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> |
1000
1000
 
1001
1001
 
1002
1002
 
@@ -1025,9 +1025,9 @@ Represents a situation when the response status is considered invalid by the sta
1025
1025
 
1026
1026
  | Name | Type | Description |
1027
1027
  | --- | --- | --- |
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. |
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.|
1031
1031
 
1032
1032
 
1033
1033
  ### JsonFormDataRequestField
@@ -1038,11 +1038,11 @@ Represents a JSON field.
1038
1038
 
1039
1039
  | Name | Type | Description |
1040
1040
  | --- | --- | --- |
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. |
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.|
1046
1046
 
1047
1047
 
1048
1048
  ### StatusValidator
@@ -1058,9 +1058,9 @@ Represents a plain text field. No filename and content type is set.
1058
1058
 
1059
1059
  | Name | Type | Description |
1060
1060
  | --- | --- | --- |
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. |
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.|
1064
1064
 
1065
1065
 
1066
1066
  ### TextFormDataResponseField
@@ -1071,9 +1071,9 @@ Represents a plain text field. No filename and content type is set.
1071
1071
 
1072
1072
  | Name | Type |
1073
1073
  | --- | --- |
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)|
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)|
1077
1077
 
1078
1078
 
1079
1079
  ### UnsupportedOperationError
@@ -1084,7 +1084,7 @@ Represents a plain text field. No filename and content type is set.
1084
1084
 
1085
1085
  | Name | Type | Description |
1086
1086
  | --- | --- | --- |
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. |
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.|
1089
1089
 
1090
1090