@diia-inhouse/http 1.9.0 → 4.0.0
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/LICENCE.md +59 -59
- package/dist/interfaces/{http.js → httpClient.js} +1 -1
- package/dist/interfaces/httpClient.js.map +1 -0
- package/dist/interfaces/index.js +1 -1
- package/dist/interfaces/index.js.map +1 -1
- package/dist/services/errors/index.js +8 -0
- package/dist/services/errors/index.js.map +1 -0
- package/dist/services/errors/operationError.js +13 -0
- package/dist/services/errors/operationError.js.map +1 -0
- package/dist/services/errors/requestError.js +15 -0
- package/dist/services/errors/requestError.js.map +1 -0
- package/dist/services/httpClient.js +205 -141
- package/dist/services/httpClient.js.map +1 -1
- package/dist/services/index.js +3 -1
- package/dist/services/index.js.map +1 -1
- package/dist/services/utils.js +22 -0
- package/dist/services/utils.js.map +1 -0
- package/dist/types/interfaces/deps.d.ts +3 -5
- package/dist/types/interfaces/httpClient.d.ts +73 -0
- package/dist/types/interfaces/index.d.ts +1 -1
- package/dist/types/services/errors/index.d.ts +2 -0
- package/dist/types/services/errors/operationError.d.ts +4 -0
- package/dist/types/services/errors/requestError.d.ts +5 -0
- package/dist/types/services/httpClient.d.ts +18 -15
- package/dist/types/services/index.d.ts +1 -1
- package/dist/types/services/utils.d.ts +4 -0
- package/package.json +40 -42
- package/dist/interfaces/http.js.map +0 -1
- package/dist/services/http.js +0 -200
- package/dist/services/http.js.map +0 -1
- package/dist/types/interfaces/http.d.ts +0 -16
- package/dist/types/services/http.d.ts +0 -23
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { ParsedUrlQueryInput } from 'node:querystring';
|
|
3
|
-
import { HttpProtocol, Logger } from '@diia-inhouse/types';
|
|
4
|
-
import { ExtendedRequestOptions, HttpServiceResponse } from '../interfaces/http';
|
|
5
|
-
/**
|
|
6
|
-
* @deprecated use HttpClientService
|
|
7
|
-
*/
|
|
8
|
-
export declare class HttpService {
|
|
9
|
-
private readonly logger;
|
|
10
|
-
private requestFn;
|
|
11
|
-
private readonly binaryMimeTypes;
|
|
12
|
-
private readonly binaryMimeTypesPrefixes;
|
|
13
|
-
constructor(logger: Logger, protocol: HttpProtocol);
|
|
14
|
-
get(options: ExtendedRequestOptions, hostFingerprint?: string): Promise<HttpServiceResponse>;
|
|
15
|
-
post(options: ExtendedRequestOptions, hostFingerprint?: string, body?: string | ParsedUrlQueryInput): Promise<HttpServiceResponse>;
|
|
16
|
-
delete(options: ExtendedRequestOptions, hostFingerprint?: string, body?: string | ParsedUrlQueryInput): Promise<HttpServiceResponse>;
|
|
17
|
-
put(options: ExtendedRequestOptions, hostFingerprint?: string, body?: string | ParsedUrlQueryInput): Promise<HttpServiceResponse>;
|
|
18
|
-
private setMethod;
|
|
19
|
-
private setCheckServerIdentity;
|
|
20
|
-
private makeRequest;
|
|
21
|
-
private isJsonContentType;
|
|
22
|
-
private isBinaryContentType;
|
|
23
|
-
}
|