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