Update http request function
This commit is contained in:
Vendored
+9
-3
@@ -1235,7 +1235,13 @@ export type HttpRequestParams = RequestOptions & {
|
||||
};
|
||||
urlEncodedFormBody?: boolean;
|
||||
};
|
||||
export type HttpRequestFunctionType = (param: HttpRequestParams) => Promise<{
|
||||
[key: string]: any;
|
||||
} | string | null>;
|
||||
export type HttpRequestFunctionType = (param: HttpRequestParams) => Promise<HttpFunctionResponse>;
|
||||
export type HttpFunctionResponse = {
|
||||
status: number;
|
||||
data?: {
|
||||
[key: string]: any;
|
||||
};
|
||||
error?: string;
|
||||
str?: string;
|
||||
};
|
||||
export {};
|
||||
|
||||
@@ -1453,4 +1453,11 @@ export type HttpRequestParams = RequestOptions & {
|
||||
|
||||
export type HttpRequestFunctionType = (
|
||||
param: HttpRequestParams
|
||||
) => Promise<{ [key: string]: any } | string | null>;
|
||||
) => Promise<HttpFunctionResponse>;
|
||||
|
||||
export type HttpFunctionResponse = {
|
||||
status: number;
|
||||
data?: { [key: string]: any };
|
||||
error?: string;
|
||||
str?: string;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user