优化
This commit is contained in:
@@ -136,4 +136,13 @@ export async function apiBlobRequest(config: AxiosRequestConfig) {
|
||||
}
|
||||
}
|
||||
|
||||
export async function apiBlobResponseRequest(config: AxiosRequestConfig) {
|
||||
try {
|
||||
const response = await transport.request<Blob>({ ...config, responseType: 'blob' })
|
||||
return { blob: response.data, headers: response.headers }
|
||||
} catch (error) {
|
||||
throw mapError(error)
|
||||
}
|
||||
}
|
||||
|
||||
export { ApiError }
|
||||
|
||||
Reference in New Issue
Block a user