u
This commit is contained in:
1 parent
d1b1aafc57
commit
0f1604c709
58 files changed
+15476
-25
No files matched your search
@@ -0,0 +1,21 @@
|
||||
import axiosInstance from "@/interceptors/http";
|
||||
|
||||
|
||||
export function httpGet<T>(url: string, params?: Record<string, any>): Promise<IResData<T>> {
|
||||
return axiosInstance.get(url, { params });
|
||||
}
|
||||
export function httpPostJson<T>(url: string, data?: Record<string, any>): Promise<IResData<T>> {
|
||||
return axiosInstance.post(url, data, {
|
||||
headers: {
|
||||
"Content-Type": "application/json"
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export function httpPostForm<T>(url: string, data?: any): Promise<IResData<T>> {
|
||||
return axiosInstance.post(url, data, {
|
||||
headers: {
|
||||
"Content-Type": "application/x-www-form-urlencoded"
|
||||
}
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user