I'm trying to set a delimiter, in this case :\n
by posting the data with axios unfortunately it contains special character which are escaped in the params string while reaching the API.
It became :\\n
//# src/stores/chat_configurations.js
const actions = {
async updateDelimeter ( commit, delimeter) {
console.log(delimeter)
// ":\n"
await axios.put(`/api/chat_configuration`, delimeter: delimeter)
}
}
before sending the request it's still unchanged.":\n"
// # src/lib/api.js
// Add a request interceptor
axios.interceptors.request.use(function (config) {
console.log(config)
// {"delimeter": ":\\n"}"
return config
}, function (error) {
// Do something with request error
return Promise.reject(error)
})
Once in the interceptor the Query string is escaped.":\\n"
Is there a way to disable unescaping special characters in the query string with axios?
Any help would be very much appreciated.