Mocks for mockserver for fetch requests. Run with: mockserver -p 5555 -m './'
/* eslint-disable */ | |
// parse the body and give it back so it gets re-stringified | |
// must be `enctype="multipart/form-data"` | |
module.exports = request.body.split('------') | |
.map(str => str.replace(/\n+/g, ' ').trim().match(/"(\w+)\b"\s+(\w+)/g)) | |
.filter(Boolean) | |
.join('\n') | |
.replace(/\"\s+/g, '": '); |
HTTP/1.1 204 No Content | |
Allow: OPTIONS, GET, HEAD, POST | |
Access-Control-Allow-Origin: * | |
Access-Control-Allow-Methods: OPTIONS, GET, HEAD, POST | |
Access-Control-Allow-Headers: Authorization,content-type | |
Access-Control-Allow-Credentials: true | |
Content-Length: 0 | |
Content-Type: text/plain |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment