@dynatrace-sdk/http-client 1.0.9 → 1.1.1

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