@dynatrace-sdk/http-client 1.0.9 → 1.0.10
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 +6 -0
- package/cjs/index.js +2 -2
- package/docs/DOCS.md +23 -21
- package/esm/index.js +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/cjs/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright 2023 Dynatrace LLC
|
|
3
|
+
* Copyright 2023-2024 Dynatrace LLC
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
* you may not use this file except in compliance with the License.
|
|
6
6
|
* You may obtain a copy of the License at
|
|
@@ -184,7 +184,7 @@ async function encodeFormDataRequestBody(body) {
|
|
|
184
184
|
);
|
|
185
185
|
break;
|
|
186
186
|
case "binary": {
|
|
187
|
-
if (field.value instanceof File) {
|
|
187
|
+
if (File && field.value instanceof File) {
|
|
188
188
|
const file = field.value;
|
|
189
189
|
formData.append(
|
|
190
190
|
field.name,
|
package/docs/DOCS.md
CHANGED
|
@@ -7,7 +7,7 @@ description: An environment agnostic (browser/deno vs nodejs) abstraction layer
|
|
|
7
7
|
|
|
8
8
|
An environment agnostic (browser/deno vs nodejs) abstraction layer for making HTTP calls.
|
|
9
9
|
|
|
10
|
-
import NpmLogo from
|
|
10
|
+
import NpmLogo from "@site/static/img/npm-logo.png";
|
|
11
11
|
|
|
12
12
|
<div class="row margin-bottom--md">
|
|
13
13
|
<div class="col">
|
|
@@ -16,8 +16,10 @@ import NpmLogo from '@site/static/img/npm-logo.png';
|
|
|
16
16
|
<img className="no-zoom" width="20px" src={NpmLogo} />
|
|
17
17
|
</a>
|
|
18
18
|
</div>
|
|
19
|
-
<div class="col" style={{textAlign:
|
|
20
|
-
<a href="https://www.npmjs.com/package/@dynatrace-sdk/http-client/v/1.0.
|
|
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>
|
|
21
23
|
</div>
|
|
22
24
|
</div>
|
|
23
25
|
|
|
@@ -88,7 +90,7 @@ Returns the binary data in a form that conforms to the specified type.
|
|
|
88
90
|
| ------------------------- | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
89
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> |
|
|
90
92
|
|
|
91
|
-
|
|
93
|
+
{/* no returns */}
|
|
92
94
|
|
|
93
95
|
</div>
|
|
94
96
|
|
|
@@ -107,7 +109,7 @@ Returns the binary data in a form that conforms to the specified type.
|
|
|
107
109
|
| ------------------------- | --------------------------------------------------------------------------------------------- |
|
|
108
110
|
| data<sup>\*required</sup> | ArrayBuffer | Blob | ReadableStream<Uint8Array> | Buffer | Readable |
|
|
109
111
|
|
|
110
|
-
|
|
112
|
+
{/* no returns */}
|
|
111
113
|
|
|
112
114
|
</div>
|
|
113
115
|
|
|
@@ -126,7 +128,7 @@ Returns the binary data in a form that conforms to the specified type.
|
|
|
126
128
|
| ------------------------- | ---------------------------------------------------------------------------------------- |
|
|
127
129
|
| json<sup>\*required</sup> | <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a> |
|
|
128
130
|
|
|
129
|
-
|
|
131
|
+
{/* no returns */}
|
|
130
132
|
|
|
131
133
|
</div>
|
|
132
134
|
|
|
@@ -145,7 +147,7 @@ Returns the binary data in a form that conforms to the specified type.
|
|
|
145
147
|
| ------------------------- | ----------------------------------------------------------------------------- |
|
|
146
148
|
| text<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> |
|
|
147
149
|
|
|
148
|
-
|
|
150
|
+
{/* no returns */}
|
|
149
151
|
|
|
150
152
|
</div>
|
|
151
153
|
|
|
@@ -194,7 +196,7 @@ Currently, only the requests to the Platform Services and the Serverless Functio
|
|
|
194
196
|
|
|
195
197
|
<div class="padding-left--md">
|
|
196
198
|
|
|
197
|
-
|
|
199
|
+
{/* no parameters */}
|
|
198
200
|
|
|
199
201
|
</div>
|
|
200
202
|
|
|
@@ -226,7 +228,7 @@ when one of the following situations happen:
|
|
|
226
228
|
|
|
227
229
|
#### Returns
|
|
228
230
|
|
|
229
|
-
Promise<HttpClientResponse> A promise that resolves with the response object or rejects with an error.
|
|
231
|
+
Promise&lt;HttpClientResponse&gt; A promise that resolves with the response object or rejects with an error.
|
|
230
232
|
|
|
231
233
|
</div>
|
|
232
234
|
|
|
@@ -363,7 +365,7 @@ Returns the response body in a form that conforms to the specified response body
|
|
|
363
365
|
| ------------------------------------- | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
364
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> |
|
|
365
367
|
|
|
366
|
-
|
|
368
|
+
{/* no returns */}
|
|
367
369
|
|
|
368
370
|
</div>
|
|
369
371
|
|
|
@@ -459,9 +461,9 @@ Aborts a request before it has completed.
|
|
|
459
461
|
|
|
460
462
|
</div>
|
|
461
463
|
|
|
462
|
-
|
|
464
|
+
{/* no parameters */}
|
|
463
465
|
|
|
464
|
-
|
|
466
|
+
{/* no returns */}
|
|
465
467
|
|
|
466
468
|
</div>
|
|
467
469
|
|
|
@@ -490,9 +492,9 @@ Represents a signal object that allows to communicate with the request and abort
|
|
|
490
492
|
|
|
491
493
|
</div>
|
|
492
494
|
|
|
493
|
-
|
|
495
|
+
{/* no parameters */}
|
|
494
496
|
|
|
495
|
-
|
|
497
|
+
{/* no returns */}
|
|
496
498
|
|
|
497
499
|
</div>
|
|
498
500
|
|
|
@@ -534,7 +536,7 @@ Returns the binary data in a form that conforms to the specified type.
|
|
|
534
536
|
| ------------------------- | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
535
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> |
|
|
536
538
|
|
|
537
|
-
|
|
539
|
+
{/* no returns */}
|
|
538
540
|
|
|
539
541
|
</div>
|
|
540
542
|
|
|
@@ -624,7 +626,7 @@ when one of the following situations happen:
|
|
|
624
626
|
|
|
625
627
|
#### Returns
|
|
626
628
|
|
|
627
|
-
Promise<HttpClientResponse> A promise that resolves with the response object or rejects with an error.
|
|
629
|
+
Promise&lt;HttpClientResponse&gt; A promise that resolves with the response object or rejects with an error.
|
|
628
630
|
|
|
629
631
|
</div>
|
|
630
632
|
|
|
@@ -724,7 +726,7 @@ Returns the response body in a form that conforms to the specified response body
|
|
|
724
726
|
| ---------------- | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
725
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> |
|
|
726
728
|
|
|
727
|
-
|
|
729
|
+
{/* no returns */}
|
|
728
730
|
|
|
729
731
|
</div>
|
|
730
732
|
|
|
@@ -846,7 +848,7 @@ Represents a plain text field. No filename and content type is set.
|
|
|
846
848
|
| ---------------------- | ---------------------------------------------------------------------------------------- |
|
|
847
849
|
| e<sup>\*required</sup> | <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a> |
|
|
848
850
|
|
|
849
|
-
|
|
851
|
+
{/* no returns */}
|
|
850
852
|
|
|
851
853
|
</div>
|
|
852
854
|
|
|
@@ -865,7 +867,7 @@ Represents a plain text field. No filename and content type is set.
|
|
|
865
867
|
| ---------------------- | ---------------------------------------------------------------------------------------- |
|
|
866
868
|
| e<sup>\*required</sup> | <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a> |
|
|
867
869
|
|
|
868
|
-
|
|
870
|
+
{/* no returns */}
|
|
869
871
|
|
|
870
872
|
</div>
|
|
871
873
|
|
|
@@ -884,7 +886,7 @@ Represents a plain text field. No filename and content type is set.
|
|
|
884
886
|
| ---------------------- | ---------------------------------------------------------------------------------------- |
|
|
885
887
|
| e<sup>\*required</sup> | <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a> |
|
|
886
888
|
|
|
887
|
-
|
|
889
|
+
{/* no returns */}
|
|
888
890
|
|
|
889
891
|
</div>
|
|
890
892
|
|
|
@@ -903,6 +905,6 @@ Represents a plain text field. No filename and content type is set.
|
|
|
903
905
|
| ---------------------- | ---------------------------------------------------------------------------------------- |
|
|
904
906
|
| e<sup>\*required</sup> | <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a> |
|
|
905
907
|
|
|
906
|
-
|
|
908
|
+
{/* no returns */}
|
|
907
909
|
|
|
908
910
|
</div>
|
package/esm/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright 2023 Dynatrace LLC
|
|
3
|
+
* Copyright 2023-2024 Dynatrace LLC
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
* you may not use this file except in compliance with the License.
|
|
6
6
|
* You may obtain a copy of the License at
|
|
@@ -144,7 +144,7 @@ async function encodeFormDataRequestBody(body) {
|
|
|
144
144
|
);
|
|
145
145
|
break;
|
|
146
146
|
case "binary": {
|
|
147
|
-
if (field.value instanceof File) {
|
|
147
|
+
if (File && field.value instanceof File) {
|
|
148
148
|
const file = field.value;
|
|
149
149
|
formData.append(
|
|
150
150
|
field.name,
|
package/package.json
CHANGED