@dynatrace-sdk/http-client 1.0.5 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,18 @@
2
2
 
3
3
  @dynatrace-sdk/http-client
4
4
 
5
+ ## 1.0.7
6
+
7
+ ### Patch Changes
8
+
9
+ - Update docs
10
+
11
+ ## 1.0.6
12
+
13
+ ### Patch Changes
14
+
15
+ - Update package description
16
+
5
17
  ## 1.0.5
6
18
 
7
19
  ### Patch Changes
package/docs/DOCS.md CHANGED
@@ -1,10 +1,12 @@
1
1
  ---
2
- title: @dynatrace-sdk/http-client
3
- description:
2
+ title: "@dynatrace-sdk/http-client"
3
+ description: An environment agnostic (browser/deno vs nodejs) abstraction layer for making HTTP calls.
4
4
  ---
5
5
 
6
6
  # @dynatrace-sdk/http-client
7
7
 
8
+ An environment agnostic (browser/deno vs nodejs) abstraction layer for making HTTP calls.
9
+
8
10
  import NpmLogo from '@site/static/img/npm-logo.png';
9
11
 
10
12
  <div class="row margin-bottom--md">
@@ -15,7 +17,7 @@ import NpmLogo from '@site/static/img/npm-logo.png';
15
17
  </a>
16
18
  </div>
17
19
  <div class="col" style={{textAlign: 'right'}}>
18
- <a href="https://www.npmjs.com/package/@dynatrace-sdk/http-client/v/1.0.5">v1.0.5</a>
20
+ <a href="https://www.npmjs.com/package/@dynatrace-sdk/http-client/v/1.0.7">v1.0.7</a>
19
21
  </div>
20
22
  </div>
21
23
 
@@ -63,16 +65,16 @@ Represents an environment agnostic (browser vs node) abstraction layer for binar
63
65
 
64
66
  #### Properties
65
67
 
66
- | Name | Type |
67
- | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
68
- | data<sup>\*required</sup> | <a href="#arraybuffer">ArrayBuffer</a> &#124; <a href="#blob">Blob</a> &#124; <a href="#readablestream">ReadableStream</a>&lt;<a href="#uint8array">Uint8Array</a>&gt; |
68
+ | Name | Type |
69
+ | ------------------------- | --------------------------------------------------------------- |
70
+ | data<sup>\*required</sup> | ArrayBuffer &#124; Blob &#124; ReadableStream&lt;Uint8Array&gt; |
69
71
 
70
72
  #### Methods
71
73
 
72
74
  ##### get
73
75
 
74
76
  <div class="padding-bottom--md">
75
- <strong>get(type): <a href="#datatypes">DataTypes</a>&lt;<a href="#t">T</a>&gt;</strong>
77
+ <strong>get(type): DataTypes&lt;T&gt;</strong>
76
78
 
77
79
  <div class="padding-left--md">
78
80
 
@@ -82,9 +84,9 @@ Returns the binary data in a form that conforms to the specified type.
82
84
 
83
85
  #### Parameters
84
86
 
85
- | Name | Type | Description |
86
- | ------------------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
87
- | type<sup>\*required</sup> | <a href="#t">T</a> | <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> |
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> |
88
90
 
89
91
  <!-- no returns -->
90
92
 
@@ -101,9 +103,9 @@ Returns the binary data in a form that conforms to the specified type.
101
103
 
102
104
  #### Parameters
103
105
 
104
- | Name | Type |
105
- | ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
106
- | data<sup>\*required</sup> | <a href="#arraybuffer">ArrayBuffer</a> &#124; <a href="#blob">Blob</a> &#124; <a href="#readablestream">ReadableStream</a>&lt;<a href="#uint8array">Uint8Array</a>&gt; &#124; <a href="#buffer">Buffer</a> &#124; <a href="#readable">Readable</a> |
106
+ | Name | Type |
107
+ | ------------------------- | --------------------------------------------------------------------------------------------- |
108
+ | data<sup>\*required</sup> | ArrayBuffer &#124; Blob &#124; ReadableStream&lt;Uint8Array&gt; &#124; Buffer &#124; Readable |
107
109
 
108
110
  <!-- no returns -->
109
111
 
@@ -201,7 +203,7 @@ Currently, only the requests to the Platform Services and the Serverless Functio
201
203
  ##### send
202
204
 
203
205
  <div class="padding-bottom--md">
204
- <strong>send(options): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a>&lt;<a href="#httpclientresponse">HttpClientResponse</a>&gt;</strong>
206
+ <strong>send(options): Promise&lt;<a href="#httpclientresponse">HttpClientResponse</a>&gt;</strong>
205
207
 
206
208
  <div class="padding-left--md">
207
209
 
@@ -218,13 +220,13 @@ when one of the following situations happen:
218
220
 
219
221
  #### Parameters
220
222
 
221
- | Name | Type | Description |
222
- | ---------------------------- | ------------------------------------------------------------------------------------------ | -------------------------------------- |
223
- | options<sup>\*required</sup> | <a href="#httpclientrequestoptions">HttpClientRequestOptions</a>&lt;<a href="#t">T</a>&gt; | Options used to configure the request. |
223
+ | Name | Type | Description |
224
+ | ---------------------------- | ------------------------------------------------------------------------- | -------------------------------------- |
225
+ | options<sup>\*required</sup> | <a href="#httpclientrequestoptions">HttpClientRequestOptions</a>&lt;T&gt; | Options used to configure the request. |
224
226
 
225
227
  #### Returns
226
228
 
227
- Promise<HttpClientResponse> A promise that resolves with the response object or rejects with an error.
229
+ Promise&lt;HttpClientResponse&gt; A promise that resolves with the response object or rejects with an error.
228
230
 
229
231
  </div>
230
232
 
@@ -304,17 +306,17 @@ Represents the response to a request.
304
306
 
305
307
  #### Parameters
306
308
 
307
- | Name | Type |
308
- | ----------------------------- | -------------------------------- |
309
- | response<sup>\*required</sup> | <a href="#response">Response</a> |
309
+ | Name | Type |
310
+ | ----------------------------- | -------- |
311
+ | response<sup>\*required</sup> | Response |
310
312
 
311
313
  </div>
312
314
 
313
315
  #### Properties
314
316
 
315
- | Name | Type |
316
- | ----------------------------- | -------------------------------- |
317
- | response<sup>\*required</sup> | <a href="#response">Response</a> |
317
+ | Name | Type |
318
+ | ----------------------------- | -------- |
319
+ | response<sup>\*required</sup> | Response |
318
320
 
319
321
  #### Accessors
320
322
 
@@ -347,7 +349,7 @@ The URL of the response.
347
349
  ##### body
348
350
 
349
351
  <div class="padding-bottom--md">
350
- <strong>body(responseBodyType): <a href="#responsebodytypes">ResponseBodyTypes</a>&lt;<a href="#t">T</a>&gt;</strong>
352
+ <strong>body(responseBodyType): ResponseBodyTypes&lt;T&gt;</strong>
351
353
 
352
354
  <div class="padding-left--md">
353
355
 
@@ -357,9 +359,9 @@ Returns the response body in a form that conforms to the specified response body
357
359
 
358
360
  #### Parameters
359
361
 
360
- | Name | Type | Description |
361
- | ------------------------------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
362
- | responseBodyType<sup>\*required</sup> | <a href="#t">T</a> | <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> |
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> |
363
365
 
364
366
  <!-- no returns -->
365
367
 
@@ -379,9 +381,9 @@ Represents a situation when the response status is considered invalid by the sta
379
381
 
380
382
  #### Parameters
381
383
 
382
- | Name | Type |
383
- | ----------------------------- | -------------------------------- |
384
- | response<sup>\*required</sup> | <a href="#response">Response</a> |
384
+ | Name | Type |
385
+ | ----------------------------- | -------- |
386
+ | response<sup>\*required</sup> | Response |
385
387
 
386
388
  </div>
387
389
 
@@ -515,7 +517,7 @@ Represents an environment agnostic (browser vs node) abstraction layer for binar
515
517
  ##### get
516
518
 
517
519
  <div class="padding-bottom--md">
518
- <strong>get(type): <a href="#datatypes">DataTypes</a>&lt;<a href="#t">T</a>&gt;</strong>
520
+ <strong>get(type): DataTypes&lt;T&gt;</strong>
519
521
 
520
522
  <div class="padding-left--md">
521
523
 
@@ -525,9 +527,9 @@ Returns the binary data in a form that conforms to the specified type.
525
527
 
526
528
  #### Parameters
527
529
 
528
- | Name | Type | Description |
529
- | ------------------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
530
- | type<sup>\*required</sup> | <a href="#t">T</a> | <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> |
530
+ | Name | Type | Description |
531
+ | ------------------------- | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
532
+ | 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> |
531
533
 
532
534
  <!-- no returns -->
533
535
 
@@ -541,13 +543,13 @@ Represents an binary field.
541
543
 
542
544
  #### Properties
543
545
 
544
- | Name | Type | Description |
545
- | -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
546
- | 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> |
547
- | 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> |
548
- | name<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | The name of the field. |
549
- | type<sup>\*required</sup> | "binary" | A binary field type discriminator. |
550
- | value<sup>\*required</sup> | <a href="#arraybuffer">ArrayBuffer</a> &#124; <a href="#blob">Blob</a> &#124; <a href="#buffer">Buffer</a> &#124; <a href="#readable">Readable</a> &#124; <a href="#binary">Binary</a> &#124; <a href="#readablestream">ReadableStream</a>&lt;<a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a>&gt; &#124; <a href="#file">File</a> | The field's value. |
546
+ | Name | Type | Description |
547
+ | -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
548
+ | 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> |
549
+ | 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> |
550
+ | name<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | The name of the field. |
551
+ | type<sup>\*required</sup> | "binary" | A binary field type discriminator. |
552
+ | 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. |
551
553
 
552
554
  ### BinaryFormDataResponseField
553
555
 
@@ -596,7 +598,7 @@ Currently, only the requests to the Platform Services and the Serverless Functio
596
598
  ##### send
597
599
 
598
600
  <div class="padding-bottom--md">
599
- <strong>send(options): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a>&lt;<a href="#httpclientresponse">HttpClientResponse</a>&gt;</strong>
601
+ <strong>send(options): Promise&lt;<a href="#httpclientresponse">HttpClientResponse</a>&gt;</strong>
600
602
 
601
603
  <div class="padding-left--md">
602
604
 
@@ -613,13 +615,13 @@ when one of the following situations happen:
613
615
 
614
616
  #### Parameters
615
617
 
616
- | Name | Type | Description |
617
- | ---------------------------- | ------------------------------------------------------------------------------------------ | -------------------------------------- |
618
- | options<sup>\*required</sup> | <a href="#httpclientrequestoptions">HttpClientRequestOptions</a>&lt;<a href="#t">T</a>&gt; | Options used to configure the request. |
618
+ | Name | Type | Description |
619
+ | ---------------------------- | ------------------------------------------------------------------------- | -------------------------------------- |
620
+ | options<sup>\*required</sup> | <a href="#httpclientrequestoptions">HttpClientRequestOptions</a>&lt;T&gt; | Options used to configure the request. |
619
621
 
620
622
  #### Returns
621
623
 
622
- Promise<HttpClientResponse> A promise that resolves with the response object or rejects with an error.
624
+ Promise&lt;HttpClientResponse&gt; A promise that resolves with the response object or rejects with an error.
623
625
 
624
626
  </div>
625
627
 
@@ -678,10 +680,10 @@ Represents the options used to configure the request.
678
680
 
679
681
  | Name | Type | Description |
680
682
  | ------------------------ | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
681
- | body | <a href="#requestbodytypes">RequestBodyTypes</a>&lt;<a href="#t">T</a>&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> |
683
+ | 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> |
682
684
  | headers | <a href="#headers">Headers</a> | The request headers. |
683
685
  | 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>. |
684
- | requestBodyType | <a href="#t">T</a> | <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> |
686
+ | 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> |
685
687
  | 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> |
686
688
  | url<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | The URL of the resource to fetch. |
687
689
 
@@ -705,7 +707,7 @@ Represents the response to a request.
705
707
  ##### body
706
708
 
707
709
  <div class="padding-bottom--md">
708
- <strong>body(responseBodyType?): <a href="#responsebodytypes">ResponseBodyTypes</a>&lt;<a href="#t">T</a>&gt;</strong>
710
+ <strong>body(responseBodyType?): ResponseBodyTypes&lt;T&gt;</strong>
709
711
 
710
712
  <div class="padding-left--md">
711
713
 
@@ -715,9 +717,9 @@ Returns the response body in a form that conforms to the specified response body
715
717
 
716
718
  #### Parameters
717
719
 
718
- | Name | Type | Description |
719
- | ---------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
720
- | responseBodyType | <a href="#t">T</a> | <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> |
720
+ | Name | Type | Description |
721
+ | ---------------- | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
722
+ | 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> |
721
723
 
722
724
  <!-- no returns -->
723
725
 
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@dynatrace-sdk/http-client",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
+ "description": "An environment agnostic (browser/deno vs nodejs) abstraction layer for making HTTP calls.",
4
5
  "license": "Apache-2.0",
5
6
  "dependencies": {
6
7
  "@dynatrace-sdk/error-handlers": "^1.1.0"