diff --git a/src/utils/http.ts b/src/utils/http.ts index afa1eaf..f4ccd36 100644 --- a/src/utils/http.ts +++ b/src/utils/http.ts @@ -53,12 +53,14 @@ export const httpGet = ( url: string, query?: Record, header?: Record, + options?: Partial, ) => { return http({ url, query, method: 'GET', header, + ...options, }) } @@ -75,6 +77,7 @@ export const httpPost = ( data?: Record, query?: Record, header?: Record, + options?: Partial, ) => { return http({ url, @@ -82,6 +85,7 @@ export const httpPost = ( data, method: 'POST', header, + ...options, }) } /** @@ -92,6 +96,7 @@ export const httpPut = ( data?: Record, query?: Record, header?: Record, + options?: Partial, ) => { return http({ url, @@ -99,6 +104,7 @@ export const httpPut = ( query, method: 'PUT', header, + ...options, }) } @@ -109,12 +115,14 @@ export const httpDelete = ( url: string, query?: Record, header?: Record, + options?: Partial, ) => { return http({ url, query, method: 'DELETE', header, + ...options, }) }