tethys.frontend/src/api/config.ts
2021-11-17 12:03:44 +01:00

15 lines
575 B
TypeScript

import { AxiosRequestConfig } from "axios";
import * as qs from "qs";
export const axiosRequestConfiguration: AxiosRequestConfig = {
responseType: "text",
headers: {
// "Content-Type": "text/plain",
"Content-Type": "application/x-www-form-urlencoded",
// "Content-Type": "application/x-www-form-urlencoded",
// credentials: "same-origin",
// "Access-Control-Allow-Credentials": "true",
// "Access-Control-Allow-Origin": "*",
},
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
};