Version
module: 5.0.0-1618898588.9655d0e
nuxt: 2.15.4
Nuxt configuration
Nuxt configuration
login: {
url: '/oauth/token/',
method: 'post',
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
transformRequest: [(data, headers) => {
console.log('transformRequest', data)
return data
}]
}
Reproduction
https://codesandbox.io/s/pedantic-waterfall-1ze8d?file=/nuxt.config.js
What is expected?
I should be able to transform the request before it's sent.
According to the doc:
Each endpoint is used to make requests using axios. They are basically extending Axios Request Config.
But I can't add a request transformer specified in https://github.com/axios/axios#request-config
I'm trying to tranform the json data into a www-form-urlencoded data (stringified).
Poke #977
What is actually happening?
An error pops before the request is made. Specifying fn is not a function.
Steps to reproduce
Add a transformRequest Array in the endpoint definition. Or go to the reproduction link.
Additional information
Checklist
Version
module: 5.0.0-1618898588.9655d0e
nuxt: 2.15.4
Nuxt configuration
mode:
Nuxt configuration
Reproduction
https://codesandbox.io/s/pedantic-waterfall-1ze8d?file=/nuxt.config.js
What is expected?
I should be able to transform the request before it's sent.
According to the doc:
I'm trying to tranform the json data into a www-form-urlencoded data (stringified).
Poke #977
What is actually happening?
An error pops before the request is made. Specifying
fn is not a function.Steps to reproduce
Add a transformRequest Array in the endpoint definition. Or go to the reproduction link.
Additional information
Checklist