On this page
article
Axios
A custom axios client
transformRequest set to undefined if the response isn’t json. Otherwise it will guess and might be wrong.
const api = axios.create({
baseURL: "https://example.com",
timeout: 5000,
headers: {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:140.0) Gecko/20100101 Firefox/140.0",
},
transformRequest: undefined,
})