Unexpected behaviour when content-type is set as global
Closed this issue · 1 comments
ownikss commented
config example:
{
"baseURL": "url",
"logger": true,
"statusDescription": {
"200": "OK",
"401": "Invalid API token"
},
"successStatus": [
200
],
"request": {
"someQuery": {
"method": "post",
"url": "/some_query",
}
}
fetch:
const field = 'value';
const response = await RestApiHelper.build('someQuery')
.withBody({ field })
.fetch();
return response.body;
expected:
Body will be translated in encoded format.
behaviour:
Content-Type is ignored.
error location
_isFormURLEncoded
method in Options.js