Currently for POST actions fast-proxy support plain/text and application/json.
if (req.body instanceof Stream) {
body = req.body
} else if (typeof req.body === 'string') {
body = req.body
populateHeaders(headers, body, 'text/plain')
} else {
body = JSON.stringify(req.body)
populateHeaders(headers, body, 'application/x-www-form-urlencoded')
}
const qs = require('querystring')
if (req.body instanceof Stream) {
body = req.body
} else if (typeof req.body === 'string') {
body = req.body
populateHeaders(headers, body, 'text/plain')
} else if (headers['content-type'] === 'application/x-www-form-urlencoded') {
const qs = require('querystring');
body = qs.stringify(req.body)
populateHeaders(headers, body, 'application/x-www-form-urlencoded')
} else {
body = JSON.stringify(req.body)
populateHeaders(headers, body, 'application/x-www-form-urlencoded')
}