@dynatrace-sdk/http-client 1.1.1 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/docs/DOCS.md CHANGED
@@ -15,7 +15,7 @@ import NpmLogo from '@site/static/img/npm-logo.png';
15
15
  <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
16
  </div>
17
17
  <div class="col" style={{textAlign: 'right'}}>
18
- <a href="https://www.npmjs.com/package/@dynatrace-sdk/http-client/v/1.1.1" target="_blank" rel="noopener noreferrer">v1.1.1</a>
18
+ <a href="https://www.npmjs.com/package/@dynatrace-sdk/http-client/v/1.3.0" target="_blank" rel="noopener noreferrer">v1.3.0</a>
19
19
  </div>
20
20
  </div>
21
21
 
@@ -27,7 +27,6 @@ npm install @dynatrace-sdk/http-client
27
27
  ## Classes
28
28
 
29
29
  ### PlatformBaseError
30
- <!-- default child "Class" -->
31
30
 
32
31
 
33
32
 
@@ -38,8 +37,8 @@ npm install @dynatrace-sdk/http-client
38
37
 
39
38
  #### Parameters
40
39
 
41
- | Name | Type|
42
- |---|---|
40
+ | Name | Type |
41
+ | --- | --- |
43
42
  |message<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
44
43
  |cause|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|
45
44
 
@@ -52,30 +51,30 @@ npm install @dynatrace-sdk/http-client
52
51
 
53
52
  #### Properties
54
53
 
55
- | Name | Type|
56
- |---|---|
57
- |cause|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|
58
- |message<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
59
- |name<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
60
- |stack|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
61
- |prepareStackTrace|Object|
62
- |stackTraceLimit<sup>*required</sup>|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|
54
+ | Name | Type | Description |
55
+ | --- | --- | --- |
56
+ |cause|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)| |
57
+ |message<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |
58
+ |name<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |
59
+ |stack|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |
60
+ |prepareStackTrace|Object|Optional override for formatting stack traces |
61
+ |stackTraceLimit<sup>*required</sup>|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)| |
63
62
 
64
63
 
65
64
  ### PlatformBinary
66
- <!-- default child "Class" -->
67
65
  Represents an environment agnostic (browser vs node) abstraction layer for binary data.
68
66
 
69
67
 
70
68
  #### Properties
71
69
 
72
- | Name | Type|
73
- |---|---|
70
+ | Name | Type |
71
+ | --- | --- |
74
72
  |data<sup>*required</sup>|ArrayBuffer &#124; Blob &#124; ReadableStream&lt;Uint8Array&gt;|
75
73
 
76
74
  #### Methods
77
75
 
78
76
 
77
+
79
78
  ##### get
80
79
 
81
80
  <div class="padding-bottom--md">
@@ -92,8 +91,8 @@ Returns the binary data in a form that conforms to the specified type.
92
91
 
93
92
  #### Parameters
94
93
 
95
- | Name | Type| Description|
96
- |---|---|---|
94
+ | Name | Type | Description |
95
+ | --- | --- | --- |
97
96
  |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> |
98
97
 
99
98
 
@@ -107,6 +106,7 @@ Returns the binary data in a form that conforms to the specified type.
107
106
 
108
107
 
109
108
 
109
+
110
110
  ##### from
111
111
 
112
112
  <div class="padding-bottom--md">
@@ -123,8 +123,8 @@ Returns the binary data in a form that conforms to the specified type.
123
123
 
124
124
  #### Parameters
125
125
 
126
- | Name | Type|
127
- |---|---|
126
+ | Name | Type |
127
+ | --- | --- |
128
128
  |data<sup>*required</sup>|ArrayBuffer &#124; Blob &#124; ReadableStream&lt;Uint8Array&gt; &#124; Buffer &#124; Readable|
129
129
 
130
130
 
@@ -138,6 +138,7 @@ Returns the binary data in a form that conforms to the specified type.
138
138
 
139
139
 
140
140
 
141
+
141
142
  ##### fromJson
142
143
 
143
144
  <div class="padding-bottom--md">
@@ -154,8 +155,8 @@ Returns the binary data in a form that conforms to the specified type.
154
155
 
155
156
  #### Parameters
156
157
 
157
- | Name | Type|
158
- |---|---|
158
+ | Name | Type |
159
+ | --- | --- |
159
160
  |json<sup>*required</sup>|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|
160
161
 
161
162
 
@@ -169,6 +170,7 @@ Returns the binary data in a form that conforms to the specified type.
169
170
 
170
171
 
171
172
 
173
+
172
174
  ##### fromText
173
175
 
174
176
  <div class="padding-bottom--md">
@@ -185,8 +187,8 @@ Returns the binary data in a form that conforms to the specified type.
185
187
 
186
188
  #### Parameters
187
189
 
188
- | Name | Type|
189
- |---|---|
190
+ | Name | Type |
191
+ | --- | --- |
190
192
  |text<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
191
193
 
192
194
 
@@ -201,7 +203,6 @@ Returns the binary data in a form that conforms to the specified type.
201
203
 
202
204
 
203
205
  ### PlatformDataTypeError
204
- <!-- default child "Class" -->
205
206
 
206
207
 
207
208
 
@@ -212,8 +213,8 @@ Returns the binary data in a form that conforms to the specified type.
212
213
 
213
214
  #### Parameters
214
215
 
215
- | Name | Type|
216
- |---|---|
216
+ | Name | Type |
217
+ | --- | --- |
217
218
  |message<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
218
219
  |cause|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|
219
220
 
@@ -226,18 +227,17 @@ Returns the binary data in a form that conforms to the specified type.
226
227
 
227
228
  #### Properties
228
229
 
229
- | Name | Type| Description|
230
- |---|---|---|
230
+ | Name | Type | Description |
231
+ | --- | --- | --- |
231
232
  |cause|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|The error root cause. |
232
233
  |message<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |
233
234
  |name<sup>*required</sup>|"DataTypeError"|The error name. |
234
235
  |stack|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |
235
- |prepareStackTrace|Object| |
236
+ |prepareStackTrace|Object|Optional override for formatting stack traces |
236
237
  |stackTraceLimit<sup>*required</sup>|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)| |
237
238
 
238
239
 
239
240
  ### PlatformHttpClient
240
- <!-- default child "Class" -->
241
241
  The http client that serves as an environment agnostic (browser vs node) abstraction for making http calls.
242
242
  It handles the authentication of the requests made to the Platform Services and the Serverless Functions.
243
243
 
@@ -246,13 +246,97 @@ Currently, only the requests to the Platform Services and the Serverless Functio
246
246
 
247
247
  #### Constructors
248
248
 
249
- ##### new PlatformHttpClient()
249
+ ##### new PlatformHttpClient(options?)
250
+ <div class="padding-left--md">
251
+
252
+ #### Parameters
253
+
254
+ | Name | Type |
255
+ | --- | --- |
256
+ |options|HttpClientConfiguration|
250
257
 
251
258
 
252
259
 
260
+
261
+ </div>
262
+
263
+
264
+
265
+ #### Properties
266
+
267
+ | Name | Type |
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)|
271
+
253
272
  #### Methods
254
273
 
255
274
 
275
+
276
+ ##### _setBaseURL
277
+
278
+ <div class="padding-bottom--md">
279
+ <strong>_setBaseURL(baseUrl): void</strong>
280
+
281
+ <div class="padding-left--md">
282
+
283
+ Sets HTTP Client Instance baseUrl param to the incoming value `baseUrl`.
284
+
285
+
286
+
287
+ </div>
288
+
289
+
290
+ #### Parameters
291
+
292
+ | Name | Type | Description |
293
+ | --- | --- | --- |
294
+ |baseUrl<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Base URL used in the request path. |
295
+
296
+
297
+
298
+
299
+
300
+
301
+
302
+ </div>
303
+
304
+
305
+
306
+
307
+
308
+ ##### _setDefaultHeaders
309
+
310
+ <div class="padding-bottom--md">
311
+ <strong>_setDefaultHeaders(defaultHeaders): void</strong>
312
+
313
+ <div class="padding-left--md">
314
+
315
+ Sets HTTP Client Instance defaultHeaders param to the incoming value `defaultHeaders`.
316
+
317
+
318
+
319
+ </div>
320
+
321
+
322
+ #### Parameters
323
+
324
+ | Name | Type | Description |
325
+ | --- | --- | --- |
326
+ |defaultHeaders<sup>*required</sup>|[Headers](#headers)|HTTP Headers to be used in outgoing requests. |
327
+
328
+
329
+
330
+
331
+
332
+
333
+
334
+ </div>
335
+
336
+
337
+
338
+
339
+
256
340
  ##### send
257
341
 
258
342
  <div class="padding-bottom--md">
@@ -275,8 +359,8 @@ when one of the following situations happen:
275
359
 
276
360
  #### Parameters
277
361
 
278
- | Name | Type| Description|
279
- |---|---|---|
362
+ | Name | Type | Description |
363
+ | --- | --- | --- |
280
364
  |options<sup>*required</sup>|[HttpClientRequestOptions](#httpclientrequestoptions)&lt;T&gt;|Options used to configure the request. |
281
365
 
282
366
 
@@ -295,7 +379,6 @@ Promise&amp;lt;HttpClientResponse&amp;gt; A promise that resolves with the respo
295
379
 
296
380
 
297
381
  ### PlatformHttpClientAbortError
298
- <!-- default child "Class" -->
299
382
  Represents a situation when the request was aborted.
300
383
 
301
384
 
@@ -306,8 +389,8 @@ Represents a situation when the request was aborted.
306
389
 
307
390
  #### Parameters
308
391
 
309
- | Name | Type|
310
- |---|---|
392
+ | Name | Type |
393
+ | --- | --- |
311
394
  |cause<sup>*required</sup>|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|
312
395
 
313
396
 
@@ -319,18 +402,17 @@ Represents a situation when the request was aborted.
319
402
 
320
403
  #### Properties
321
404
 
322
- | Name | Type| Description|
323
- |---|---|---|
405
+ | Name | Type | Description |
406
+ | --- | --- | --- |
324
407
  |cause<sup>*required</sup>|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|The error root cause. |
325
408
  |message<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |
326
409
  |name<sup>*required</sup>|"AbortError"|The error name. |
327
410
  |stack|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |
328
- |prepareStackTrace|Object| |
411
+ |prepareStackTrace|Object|Optional override for formatting stack traces |
329
412
  |stackTraceLimit<sup>*required</sup>|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)| |
330
413
 
331
414
 
332
415
  ### PlatformHttpClientRequestError
333
- <!-- default child "Class" -->
334
416
  Represents a situation when the request is invalid and cannot be sent.
335
417
 
336
418
 
@@ -341,8 +423,8 @@ Represents a situation when the request is invalid and cannot be sent.
341
423
 
342
424
  #### Parameters
343
425
 
344
- | Name | Type|
345
- |---|---|
426
+ | Name | Type |
427
+ | --- | --- |
346
428
  |cause<sup>*required</sup>|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|
347
429
 
348
430
 
@@ -354,18 +436,17 @@ Represents a situation when the request is invalid and cannot be sent.
354
436
 
355
437
  #### Properties
356
438
 
357
- | Name | Type| Description|
358
- |---|---|---|
439
+ | Name | Type | Description |
440
+ | --- | --- | --- |
359
441
  |cause<sup>*required</sup>|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|The error root cause. |
360
442
  |message<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |
361
443
  |name<sup>*required</sup>|"RequestError"|The error name. |
362
444
  |stack|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |
363
- |prepareStackTrace|Object| |
445
+ |prepareStackTrace|Object|Optional override for formatting stack traces |
364
446
  |stackTraceLimit<sup>*required</sup>|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)| |
365
447
 
366
448
 
367
449
  ### PlatformHttpClientResponse
368
- <!-- default child "Class" -->
369
450
  Represents the response to a request.
370
451
 
371
452
 
@@ -376,8 +457,8 @@ Represents the response to a request.
376
457
 
377
458
  #### Parameters
378
459
 
379
- | Name | Type|
380
- |---|---|
460
+ | Name | Type |
461
+ | --- | --- |
381
462
  |response<sup>*required</sup>|Response|
382
463
 
383
464
 
@@ -389,35 +470,32 @@ Represents the response to a request.
389
470
 
390
471
  #### Properties
391
472
 
392
- | Name | Type|
393
- |---|---|
473
+ | Name | Type |
474
+ | --- | --- |
394
475
  |response<sup>*required</sup>|Response|
395
476
 
396
477
  #### Accessors
397
478
 
398
479
  ##### headers
399
- <!-- default child "Accessor" -->
400
480
  The response headers.
401
481
 
402
482
 
403
483
  ##### status
404
- <!-- default child "Accessor" -->
405
484
  The status code of the response.
406
485
 
407
486
 
408
487
  ##### statusText
409
- <!-- default child "Accessor" -->
410
488
  The status message corresponding to the status code.
411
489
 
412
490
 
413
491
  ##### url
414
- <!-- default child "Accessor" -->
415
492
  The URL of the response.
416
493
 
417
494
 
418
495
  #### Methods
419
496
 
420
497
 
498
+
421
499
  ##### body
422
500
 
423
501
  <div class="padding-bottom--md">
@@ -434,8 +512,8 @@ Returns the response body in a form that conforms to the specified response body
434
512
 
435
513
  #### Parameters
436
514
 
437
- | Name | Type| Description|
438
- |---|---|---|
515
+ | Name | Type | Description |
516
+ | --- | --- | --- |
439
517
  |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> |
440
518
 
441
519
 
@@ -450,7 +528,6 @@ Returns the response body in a form that conforms to the specified response body
450
528
 
451
529
 
452
530
  ### PlatformHttpClientResponseError
453
- <!-- default child "Class" -->
454
531
  Represents a situation when the response status is considered invalid by the status validator.
455
532
 
456
533
 
@@ -461,8 +538,8 @@ Represents a situation when the response status is considered invalid by the sta
461
538
 
462
539
  #### Parameters
463
540
 
464
- | Name | Type|
465
- |---|---|
541
+ | Name | Type |
542
+ | --- | --- |
466
543
  |response<sup>*required</sup>|Response|
467
544
  |data|Object|
468
545
  |data.requestMethod|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
@@ -476,20 +553,19 @@ Represents a situation when the response status is considered invalid by the sta
476
553
 
477
554
  #### Properties
478
555
 
479
- | Name | Type| Description|
480
- |---|---|---|
556
+ | Name | Type | Description |
557
+ | --- | --- | --- |
481
558
  |cause|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|The error root cause. |
482
559
  |message<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |
483
560
  |name<sup>*required</sup>|"ResponseError"|The error name. |
484
561
  |requestMethod|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |
485
562
  |response<sup>*required</sup>|[HttpClientResponse](#httpclientresponse)|The response. |
486
563
  |stack|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |
487
- |prepareStackTrace|Object| |
564
+ |prepareStackTrace|Object|Optional override for formatting stack traces |
488
565
  |stackTraceLimit<sup>*required</sup>|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)| |
489
566
 
490
567
 
491
568
  ### PlatformUnsupportedOperationError
492
- <!-- default child "Class" -->
493
569
 
494
570
 
495
571
 
@@ -500,8 +576,8 @@ Represents a situation when the response status is considered invalid by the sta
500
576
 
501
577
  #### Parameters
502
578
 
503
- | Name | Type|
504
- |---|---|
579
+ | Name | Type |
580
+ | --- | --- |
505
581
  |message<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
506
582
  |cause|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|
507
583
 
@@ -514,18 +590,17 @@ Represents a situation when the response status is considered invalid by the sta
514
590
 
515
591
  #### Properties
516
592
 
517
- | Name | Type| Description|
518
- |---|---|---|
593
+ | Name | Type | Description |
594
+ | --- | --- | --- |
519
595
  |cause|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|The error root cause. |
520
596
  |message<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |
521
597
  |name<sup>*required</sup>|"UnsupportedOperationError"|The error name. |
522
598
  |stack|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |
523
- |prepareStackTrace|Object| |
599
+ |prepareStackTrace|Object|Optional override for formatting stack traces |
524
600
  |stackTraceLimit<sup>*required</sup>|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)| |
525
601
 
526
602
 
527
603
  ### _OAuthHttpClient
528
- <!-- default child "Class" -->
529
604
  DO NOT USE - internal use only.
530
605
 
531
606
 
@@ -537,13 +612,14 @@ DO NOT USE - internal use only.
537
612
 
538
613
  #### Properties
539
614
 
540
- | Name | Type|
541
- |---|---|
615
+ | Name | Type |
616
+ | --- | --- |
542
617
  |oauthToken|OAuthToken|
543
618
 
544
619
  #### Methods
545
620
 
546
621
 
622
+
547
623
  ##### send
548
624
 
549
625
  <div class="padding-bottom--md">
@@ -566,8 +642,8 @@ when one of the following situations happen:
566
642
 
567
643
  #### Parameters
568
644
 
569
- | Name | Type| Description|
570
- |---|---|---|
645
+ | Name | Type | Description |
646
+ | --- | --- | --- |
571
647
  |options<sup>*required</sup>|[HttpClientRequestOptions](#httpclientrequestoptions)&lt;T&gt;|Options used to configure the request. |
572
648
 
573
649
 
@@ -588,19 +664,19 @@ Promise&amp;lt;HttpClientResponse&amp;gt; A promise that resolves with the respo
588
664
  ## Interfaces
589
665
 
590
666
  ### AbortController
591
- <!-- default child "Interface" -->
592
667
  Represents a controller object that allows to abort one or more requests as and when desired.
593
668
 
594
669
 
595
670
  #### Properties
596
671
 
597
- | Name | Type| Description|
598
- |---|---|---|
599
- |signal<sup>*required</sup>|[AbortSignal](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal)|Returns an AbortSignal object instance, which can be used to communicate with a request. |
672
+ | Name | Type | Description |
673
+ | --- | --- | --- |
674
+ |signal<sup>*required</sup>|AbortSignal|Returns an AbortSignal object instance, which can be used to communicate with a request. |
600
675
 
601
676
  #### Methods
602
677
 
603
678
 
679
+
604
680
  ##### abort
605
681
 
606
682
  <div class="padding-bottom--md">
@@ -619,59 +695,19 @@ Aborts a request before it has completed.
619
695
 
620
696
 
621
697
 
622
- </div>
623
-
624
-
625
-
626
-
627
- ### AbortSignal
628
- <!-- default child "Interface" -->
629
- Represents a signal object that allows to communicate with the request and abort it using the `AbortController`.
630
-
631
-
632
- #### Properties
633
-
634
- | Name | Type| Description|
635
- |---|---|---|
636
- |aborted<sup>*required</sup>|[boolean](https://developer.mozilla.org/en-US/docs/Glossary/Boolean)|A flag indicating whether the requests the signal is communicating with are aborted. |
637
- |onabort<sup>*required</sup>|null &#124; Object|Invoked when the requests the signal is communicating with are aborted. |
638
- |reason<sup>*required</sup>|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)| |
639
-
640
- #### Methods
641
-
642
-
643
- ##### throwIfAborted
644
-
645
- <div class="padding-bottom--md">
646
- <strong>throwIfAborted(): void</strong>
647
-
648
- <div class="padding-left--md">
649
-
650
-
651
-
652
-
653
-
654
- </div>
655
-
656
-
657
-
658
-
659
-
660
-
661
698
  </div>
662
699
 
663
700
 
664
701
 
665
702
 
666
703
  ### BaseError
667
- <!-- default child "Interface" -->
668
704
 
669
705
 
670
706
 
671
707
  #### Properties
672
708
 
673
- | Name | Type|
674
- |---|---|
709
+ | Name | Type |
710
+ | --- | --- |
675
711
  |cause|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|
676
712
  |message<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
677
713
  |name<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
@@ -679,13 +715,13 @@ Represents a signal object that allows to communicate with the request and abort
679
715
 
680
716
 
681
717
  ### Binary
682
- <!-- default child "Interface" -->
683
718
  Represents an environment agnostic (browser vs node) abstraction layer for binary data.
684
719
 
685
720
 
686
721
  #### Methods
687
722
 
688
723
 
724
+
689
725
  ##### get
690
726
 
691
727
  <div class="padding-bottom--md">
@@ -702,8 +738,8 @@ Returns the binary data in a form that conforms to the specified type.
702
738
 
703
739
  #### Parameters
704
740
 
705
- | Name | Type| Description|
706
- |---|---|---|
741
+ | Name | Type | Description |
742
+ | --- | --- | --- |
707
743
  |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> |
708
744
 
709
745
 
@@ -718,14 +754,13 @@ Returns the binary data in a form that conforms to the specified type.
718
754
 
719
755
 
720
756
  ### BinaryFormDataRequestField
721
- <!-- default child "Interface" -->
722
757
  Represents an binary field.
723
758
 
724
759
 
725
760
  #### Properties
726
761
 
727
- | Name | Type| Description|
728
- |---|---|---|
762
+ | Name | Type | Description |
763
+ | --- | --- | --- |
729
764
  |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> |
730
765
  |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> |
731
766
  |name<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The name of the field. |
@@ -734,14 +769,13 @@ Represents an binary field.
734
769
 
735
770
 
736
771
  ### BinaryFormDataResponseField
737
- <!-- default child "Interface" -->
738
772
 
739
773
 
740
774
 
741
775
  #### Properties
742
776
 
743
- | Name | Type|
744
- |---|---|
777
+ | Name | Type |
778
+ | --- | --- |
745
779
  |contentType<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
746
780
  |filename<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
747
781
  |name<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
@@ -750,14 +784,13 @@ Represents an binary field.
750
784
 
751
785
 
752
786
  ### DataTypeError
753
- <!-- default child "Interface" -->
754
787
 
755
788
 
756
789
 
757
790
  #### Properties
758
791
 
759
- | Name | Type| Description|
760
- |---|---|---|
792
+ | Name | Type | Description |
793
+ | --- | --- | --- |
761
794
  |cause|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|The error root cause. |
762
795
  |message<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |
763
796
  |name<sup>*required</sup>|"DataTypeError"|The error name. |
@@ -765,12 +798,10 @@ Represents an binary field.
765
798
 
766
799
 
767
800
  ### Headers
768
- <!-- default child "Interface" -->
769
801
  Represents http headers.
770
802
 
771
803
 
772
804
  ### HttpClient
773
- <!-- default child "Interface" -->
774
805
  The http client that serves as an environment agnostic (browser vs node) abstraction for making http calls.
775
806
  It handles the authentication of the requests made to the Platform Services and the Serverless Functions.
776
807
 
@@ -780,6 +811,7 @@ Currently, only the requests to the Platform Services and the Serverless Functio
780
811
  #### Methods
781
812
 
782
813
 
814
+
783
815
  ##### send
784
816
 
785
817
  <div class="padding-bottom--md">
@@ -802,8 +834,8 @@ when one of the following situations happen:
802
834
 
803
835
  #### Parameters
804
836
 
805
- | Name | Type| Description|
806
- |---|---|---|
837
+ | Name | Type | Description |
838
+ | --- | --- | --- |
807
839
  |options<sup>*required</sup>|[HttpClientRequestOptions](#httpclientrequestoptions)&lt;T&gt;|Options used to configure the request. |
808
840
 
809
841
 
@@ -822,14 +854,13 @@ Promise&amp;lt;HttpClientResponse&amp;gt; A promise that resolves with the respo
822
854
 
823
855
 
824
856
  ### HttpClientAbortError
825
- <!-- default child "Interface" -->
826
857
  Represents a situation when the request was aborted.
827
858
 
828
859
 
829
860
  #### Properties
830
861
 
831
- | Name | Type| Description|
832
- |---|---|---|
862
+ | Name | Type | Description |
863
+ | --- | --- | --- |
833
864
  |cause|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|The error root cause. |
834
865
  |message<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |
835
866
  |name<sup>*required</sup>|"AbortError"|The error name. |
@@ -837,14 +868,13 @@ Represents a situation when the request was aborted.
837
868
 
838
869
 
839
870
  ### HttpClientNetworkError
840
- <!-- default child "Interface" -->
841
871
  Represents a situation when a network error occurred.
842
872
 
843
873
 
844
874
  #### Properties
845
875
 
846
- | Name | Type| Description|
847
- |---|---|---|
876
+ | Name | Type | Description |
877
+ | --- | --- | --- |
848
878
  |cause|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|The error root cause. |
849
879
  |message<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |
850
880
  |name<sup>*required</sup>|"NetworkError"|The error name. |
@@ -852,14 +882,13 @@ Represents a situation when a network error occurred.
852
882
 
853
883
 
854
884
  ### HttpClientRequestError
855
- <!-- default child "Interface" -->
856
885
  Represents a situation when the request is invalid and cannot be sent.
857
886
 
858
887
 
859
888
  #### Properties
860
889
 
861
- | Name | Type| Description|
862
- |---|---|---|
890
+ | Name | Type | Description |
891
+ | --- | --- | --- |
863
892
  |cause|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|The error root cause. |
864
893
  |message<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |
865
894
  |name<sup>*required</sup>|"RequestError"|The error name. |
@@ -867,14 +896,13 @@ Represents a situation when the request is invalid and cannot be sent.
867
896
 
868
897
 
869
898
  ### HttpClientRequestOptions
870
- <!-- default child "Interface" -->
871
899
  Represents the options used to configure the request.
872
900
 
873
901
 
874
902
  #### Properties
875
903
 
876
- | Name | Type| Description|
877
- |---|---|---|
904
+ | Name | Type | Description |
905
+ | --- | --- | --- |
878
906
  |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> |
879
907
  |headers|[Headers](#headers)|The request headers. |
880
908
  |method|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The request method, e.g. <code>GET</code>, <code>POST</code>. |
@@ -884,14 +912,13 @@ Represents the options used to configure the request.
884
912
 
885
913
 
886
914
  ### HttpClientResponse
887
- <!-- default child "Interface" -->
888
915
  Represents the response to a request.
889
916
 
890
917
 
891
918
  #### Properties
892
919
 
893
- | Name | Type| Description|
894
- |---|---|---|
920
+ | Name | Type | Description |
921
+ | --- | --- | --- |
895
922
  |headers<sup>*required</sup>|[Headers](#headers)|The response headers. |
896
923
  |status<sup>*required</sup>|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|The status code of the response. |
897
924
  |statusText<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The status message corresponding to the status code. |
@@ -900,6 +927,7 @@ Represents the response to a request.
900
927
  #### Methods
901
928
 
902
929
 
930
+
903
931
  ##### body
904
932
 
905
933
  <div class="padding-bottom--md">
@@ -916,8 +944,8 @@ Returns the response body in a form that conforms to the specified response body
916
944
 
917
945
  #### Parameters
918
946
 
919
- | Name | Type| Description|
920
- |---|---|---|
947
+ | Name | Type | Description |
948
+ | --- | --- | --- |
921
949
  |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> |
922
950
 
923
951
 
@@ -932,14 +960,13 @@ Returns the response body in a form that conforms to the specified response body
932
960
 
933
961
 
934
962
  ### HttpClientResponseError
935
- <!-- default child "Interface" -->
936
963
  Represents a situation when the response status is considered invalid by the status validator.
937
964
 
938
965
 
939
966
  #### Properties
940
967
 
941
- | Name | Type| Description|
942
- |---|---|---|
968
+ | Name | Type | Description |
969
+ | --- | --- | --- |
943
970
  |cause|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|The error root cause. |
944
971
  |message<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |
945
972
  |name<sup>*required</sup>|"ResponseError"|The error name. |
@@ -948,14 +975,13 @@ Represents a situation when the response status is considered invalid by the sta
948
975
 
949
976
 
950
977
  ### JsonFormDataRequestField
951
- <!-- default child "Interface" -->
952
978
  Represents a JSON field.
953
979
 
954
980
 
955
981
  #### Properties
956
982
 
957
- | Name | Type| Description|
958
- |---|---|---|
983
+ | Name | Type | Description |
984
+ | --- | --- | --- |
959
985
  |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> |
960
986
  |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> |
961
987
  |name<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The name of the field. |
@@ -964,47 +990,44 @@ Represents a JSON field.
964
990
 
965
991
 
966
992
  ### StatusValidator
967
- <!-- default child "Interface" -->
968
-
993
+ Represents a function used to validate the response status code.
994
+ If `true` is returned, the status is considered valid (request succeeded), otherwise it&apos;s considered invalid (request failed).
969
995
 
970
996
 
971
997
  ### TextFormDataRequestField
972
- <!-- default child "Interface" -->
973
998
  Represents a plain text field. No filename and content type is set.
974
999
 
975
1000
 
976
1001
  #### Properties
977
1002
 
978
- | Name | Type| Description|
979
- |---|---|---|
1003
+ | Name | Type | Description |
1004
+ | --- | --- | --- |
980
1005
  |name<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The name of the field. |
981
1006
  |type<sup>*required</sup>|"text"|A plain text field type discriminator. |
982
1007
  |value<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The field's value. |
983
1008
 
984
1009
 
985
1010
  ### TextFormDataResponseField
986
- <!-- default child "Interface" -->
987
1011
 
988
1012
 
989
1013
 
990
1014
  #### Properties
991
1015
 
992
- | Name | Type|
993
- |---|---|
1016
+ | Name | Type |
1017
+ | --- | --- |
994
1018
  |name<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
995
1019
  |type<sup>*required</sup>|"text"|
996
1020
  |value<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
997
1021
 
998
1022
 
999
1023
  ### UnsupportedOperationError
1000
- <!-- default child "Interface" -->
1001
1024
 
1002
1025
 
1003
1026
 
1004
1027
  #### Properties
1005
1028
 
1006
- | Name | Type| Description|
1007
- |---|---|---|
1029
+ | Name | Type | Description |
1030
+ | --- | --- | --- |
1008
1031
  |cause|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|The error root cause. |
1009
1032
  |message<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |
1010
1033
  |name<sup>*required</sup>|"UnsupportedOperationError"|The error name. |
@@ -1012,14 +1035,13 @@ Represents a plain text field. No filename and content type is set.
1012
1035
 
1013
1036
 
1014
1037
  ### _OAuthHttpClientConfig
1015
- <!-- default child "Interface" -->
1016
1038
  DO NOT USE - internal use only.
1017
1039
 
1018
1040
 
1019
1041
  #### Properties
1020
1042
 
1021
- | Name | Type|
1022
- |---|---|
1043
+ | Name | Type |
1044
+ | --- | --- |
1023
1045
  |authUrl<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
1024
1046
  |clientId<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
1025
1047
  |environmentUrl<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
@@ -1068,6 +1090,7 @@ DO NOT USE - internal use only.
1068
1090
  ## Functions
1069
1091
 
1070
1092
 
1093
+
1071
1094
  ### isHttpClientAbortError
1072
1095
 
1073
1096
  <div class="padding-bottom--md">
@@ -1084,8 +1107,8 @@ DO NOT USE - internal use only.
1084
1107
 
1085
1108
  #### Parameters
1086
1109
 
1087
- | Name | Type|
1088
- |---|---|
1110
+ | Name | Type |
1111
+ | --- | --- |
1089
1112
  |e<sup>*required</sup>|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|
1090
1113
 
1091
1114
 
@@ -1099,6 +1122,7 @@ DO NOT USE - internal use only.
1099
1122
 
1100
1123
 
1101
1124
 
1125
+
1102
1126
  ### isHttpClientNetworkError
1103
1127
 
1104
1128
  <div class="padding-bottom--md">
@@ -1115,8 +1139,8 @@ DO NOT USE - internal use only.
1115
1139
 
1116
1140
  #### Parameters
1117
1141
 
1118
- | Name | Type|
1119
- |---|---|
1142
+ | Name | Type |
1143
+ | --- | --- |
1120
1144
  |e<sup>*required</sup>|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|
1121
1145
 
1122
1146
 
@@ -1130,6 +1154,7 @@ DO NOT USE - internal use only.
1130
1154
 
1131
1155
 
1132
1156
 
1157
+
1133
1158
  ### isHttpClientRequestError
1134
1159
 
1135
1160
  <div class="padding-bottom--md">
@@ -1146,8 +1171,8 @@ DO NOT USE - internal use only.
1146
1171
 
1147
1172
  #### Parameters
1148
1173
 
1149
- | Name | Type|
1150
- |---|---|
1174
+ | Name | Type |
1175
+ | --- | --- |
1151
1176
  |e<sup>*required</sup>|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|
1152
1177
 
1153
1178
 
@@ -1161,6 +1186,7 @@ DO NOT USE - internal use only.
1161
1186
 
1162
1187
 
1163
1188
 
1189
+
1164
1190
  ### isHttpClientResponseError
1165
1191
 
1166
1192
  <div class="padding-bottom--md">
@@ -1177,8 +1203,8 @@ DO NOT USE - internal use only.
1177
1203
 
1178
1204
  #### Parameters
1179
1205
 
1180
- | Name | Type|
1181
- |---|---|
1206
+ | Name | Type |
1207
+ | --- | --- |
1182
1208
  |e<sup>*required</sup>|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|
1183
1209
 
1184
1210