Open nagytom opened 3 months ago
Temporary workaround:
http.post('*/echo', async ({ request }) => {
const body = await request.clone().json();
return HttpResponse.json(body);
})
Happy to accept pull requests to sort, sorry for late reply
Software versions
"@pactflow/pact-msw-adapter": "3.0.0"
Issue Checklist
Please confirm the following:
Expected behavior
The request body should be consumable in the MSW handler without causing
writeToFile
to fail.Actual behavior
writeToFile
fails because it tries to clone the request and read the body which is already consumed (src).This is not allowed by the specs (MDN):
Steps to reproduce
Relevant log files
-