@ekhein/http-request 1.0.2 → 1.0.4
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/dist/main.d.ts +6 -5
- package/dist/main.js +2 -1
- package/package.json +1 -1
- package/types/http-request.d.ts +2 -2
package/dist/main.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { AxiosInstance
|
|
2
|
-
|
|
3
|
-
export type { HttpRequestConfig, HttpServiceTypes, HttpLiuGuanProxy, HttpPhone4GProxy, } from '../types/http-request';
|
|
1
|
+
import { AxiosInstance } from "axios";
|
|
2
|
+
import { HttpRequestConfig } from "../types/http-request";
|
|
4
3
|
export declare class HttpRequest {
|
|
5
4
|
readonly instance: AxiosInstance;
|
|
6
|
-
constructor(options:
|
|
7
|
-
execute<R = any>(options:
|
|
5
|
+
constructor(options: HttpRequestConfig);
|
|
6
|
+
execute<R = any>(options: HttpRequestConfig): Promise<R>;
|
|
8
7
|
post<R = any>(url: string, data?: any): Promise<R>;
|
|
9
8
|
call<R = any>(path: string, data: object): Promise<R>;
|
|
10
9
|
}
|
|
10
|
+
export * from './exceptions';
|
|
11
|
+
export * from '../types/http-request';
|
package/dist/main.js
CHANGED
|
@@ -49,7 +49,6 @@ const agent_1 = require("./agent");
|
|
|
49
49
|
const agent_2 = require("./agent");
|
|
50
50
|
const agent_3 = require("./agent");
|
|
51
51
|
const exceptions_1 = require("./exceptions");
|
|
52
|
-
__exportStar(require("./exceptions"), exports);
|
|
53
52
|
class HttpRequest {
|
|
54
53
|
instance;
|
|
55
54
|
constructor(options) {
|
|
@@ -218,3 +217,5 @@ class HttpRequest {
|
|
|
218
217
|
}
|
|
219
218
|
}
|
|
220
219
|
exports.HttpRequest = HttpRequest;
|
|
220
|
+
__exportStar(require("./exceptions"), exports);
|
|
221
|
+
__exportStar(require("../types/http-request"), exports);
|
package/package.json
CHANGED
package/types/http-request.d.ts
CHANGED
|
@@ -41,7 +41,7 @@ export interface ExtendAxiosRequestConfig extends Record<string, any> {
|
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
export interface HttpRequestConfig extends
|
|
44
|
+
export interface HttpRequestConfig extends ExtendAxiosRequestConfig, AxiosRequestConfig {}
|
|
45
45
|
|
|
46
|
-
}
|
|
46
|
+
export interface HttpResponse extends ExtendAxiosResponse {}
|
|
47
47
|
|