Closed chr1s1k closed 10 months ago
connect-api-mocker uses body-parser for parsing request bodies. And it's possible to set the type of request body for body-parser as follows:
apiMocker('/text', {
target: 'test/mocks',
bodyParser: {
type: 'urlencoded',
options: { extended: true }
}
})
For other options of bodyParser.urlencoded you can check document: https://github.com/expressjs/body-parser#bodyparserurlencodedoptions
Hopefully that will help.
Hi there,
is it possible to read and parse data from a request that are being sent as
FormData
?And then in
api/mock-url/POST.js