@dynatrace-sdk/http-client 1.3.1 → 1.5.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/CHANGELOG.md +23 -1
- package/cjs/index.js +22 -9
- package/docs/DOCS.md +191 -320
- package/esm/index.js +22 -9
- package/package.json +3 -5
- package/types/index.d.ts +617 -1
- package/types/packages/http-client/src/index.d.ts +0 -2
- package/types/packages/http-client/src/lib/platform/abort-controller.d.ts +0 -6
- package/types/packages/http-client/src/lib/platform/abort-signal.d.ts +0 -6
- package/types/packages/http-client/src/lib/platform/apply-content-type-header.d.ts +0 -2
- package/types/packages/http-client/src/lib/platform/base-error.d.ts +0 -5
- package/types/packages/http-client/src/lib/platform/binary.d.ts +0 -13
- package/types/packages/http-client/src/lib/platform/data-type-error.d.ts +0 -6
- package/types/packages/http-client/src/lib/platform/decode-form-data.d.ts +0 -48
- package/types/packages/http-client/src/lib/platform/decode-response-body.d.ts +0 -3
- package/types/packages/http-client/src/lib/platform/default-status-validator.d.ts +0 -2
- package/types/packages/http-client/src/lib/platform/encode-request-body.d.ts +0 -2
- package/types/packages/http-client/src/lib/platform/http-client-abort-error.d.ts +0 -7
- package/types/packages/http-client/src/lib/platform/http-client-request-error.d.ts +0 -7
- package/types/packages/http-client/src/lib/platform/http-client-response-error-serializer.d.ts +0 -3
- package/types/packages/http-client/src/lib/platform/http-client-response-error.d.ts +0 -11
- package/types/packages/http-client/src/lib/platform/http-client-response.d.ts +0 -10
- package/types/packages/http-client/src/lib/platform/http-client.d.ts +0 -24
- package/types/packages/http-client/src/lib/platform/index.d.ts +0 -12
- package/types/packages/http-client/src/lib/platform/oauth-http-client.d.ts +0 -41
- package/types/packages/http-client/src/lib/platform/unsupported-operation-error.d.ts +0 -6
- package/types/packages/http-client/src/lib/types/abort-controller.d.ts +0 -14
- package/types/packages/http-client/src/lib/types/abort-signal.d.ts +0 -18
- package/types/packages/http-client/src/lib/types/base-error.d.ts +0 -4
- package/types/packages/http-client/src/lib/types/binary.d.ts +0 -15
- package/types/packages/http-client/src/lib/types/data-type-error.d.ts +0 -14
- package/types/packages/http-client/src/lib/types/data-types.d.ts +0 -36
- package/types/packages/http-client/src/lib/types/form-data-request-body.d.ts +0 -83
- package/types/packages/http-client/src/lib/types/form-data-response-body.d.ts +0 -15
- package/types/packages/http-client/src/lib/types/headers.d.ts +0 -6
- package/types/packages/http-client/src/lib/types/http-client-abort-error.d.ts +0 -15
- package/types/packages/http-client/src/lib/types/http-client-network-error.d.ts +0 -15
- package/types/packages/http-client/src/lib/types/http-client-request-error.d.ts +0 -15
- package/types/packages/http-client/src/lib/types/http-client-request-options.d.ts +0 -42
- package/types/packages/http-client/src/lib/types/http-client-response-error.d.ts +0 -20
- package/types/packages/http-client/src/lib/types/http-client-response.d.ts +0 -33
- package/types/packages/http-client/src/lib/types/http-client.d.ts +0 -24
- package/types/packages/http-client/src/lib/types/index.d.ts +0 -20
- package/types/packages/http-client/src/lib/types/request-body-types.d.ts +0 -26
- package/types/packages/http-client/src/lib/types/response-body-types.d.ts +0 -46
- package/types/packages/http-client/src/lib/types/status-validator.d.ts +0 -7
- package/types/packages/http-client/src/lib/types/unsupported-operation-error.d.ts +0 -14
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
|
-
import type * as stream from 'stream';
|
|
4
|
-
import { FormDataResponseBody } from './form-data-response-body';
|
|
5
|
-
import { Binary } from './binary';
|
|
6
|
-
/**
|
|
7
|
-
* Mapping between the response body type names and types.
|
|
8
|
-
*/
|
|
9
|
-
export type ResponseBodyTypes = {
|
|
10
|
-
/**
|
|
11
|
-
* A text response body type.
|
|
12
|
-
*/
|
|
13
|
-
text: Promise<string>;
|
|
14
|
-
/**
|
|
15
|
-
* A JSON response body type.
|
|
16
|
-
*/
|
|
17
|
-
json: Promise<any>;
|
|
18
|
-
/**
|
|
19
|
-
* A binary body type.
|
|
20
|
-
*/
|
|
21
|
-
binary: Promise<Binary>;
|
|
22
|
-
/**
|
|
23
|
-
* A multipart/form-data body type.
|
|
24
|
-
*/
|
|
25
|
-
'form-data': Promise<FormDataResponseBody>;
|
|
26
|
-
/**
|
|
27
|
-
* An ArrayBuffer response body type.
|
|
28
|
-
*/
|
|
29
|
-
'array-buffer': Promise<ArrayBuffer>;
|
|
30
|
-
/**
|
|
31
|
-
* A Blob response body type. Browser only.
|
|
32
|
-
*/
|
|
33
|
-
blob: Promise<Blob>;
|
|
34
|
-
/**
|
|
35
|
-
* A ReadableStream response body type. Browser only.
|
|
36
|
-
*/
|
|
37
|
-
'readable-stream': ReadableStream<Uint8Array>;
|
|
38
|
-
/**
|
|
39
|
-
* A Buffer response body type. Node only.
|
|
40
|
-
*/
|
|
41
|
-
buffer: Promise<Buffer>;
|
|
42
|
-
/**
|
|
43
|
-
* A Stream response body type. Node only.
|
|
44
|
-
*/
|
|
45
|
-
stream: stream.Readable;
|
|
46
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Represents a function used to validate the response status code.
|
|
3
|
-
* If `true` is returned, the status is considered valid (request succeeded), otherwise it's considered invalid (request failed).
|
|
4
|
-
*/
|
|
5
|
-
export interface StatusValidator {
|
|
6
|
-
(status: number): boolean;
|
|
7
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Represents a situation when the requested operation is not supported.
|
|
3
|
-
*/
|
|
4
|
-
import { BaseError } from './base-error';
|
|
5
|
-
export interface UnsupportedOperationError extends BaseError {
|
|
6
|
-
/**
|
|
7
|
-
* The error name.
|
|
8
|
-
*/
|
|
9
|
-
readonly name: 'UnsupportedOperationError';
|
|
10
|
-
/**
|
|
11
|
-
* The error root cause.
|
|
12
|
-
*/
|
|
13
|
-
readonly cause?: any;
|
|
14
|
-
}
|