You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The native fetch implemented in a browser (along with node-fetch) provide a complex behaviour when processing body. Namely, in case body is a URLSearchParams object, it adds this header 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8' to the request and also serializes the corresponding form data.
The problem is that when intersecting the native fetch, Polly doesn't handle this case sending an empty body and a missing type header. Here's a link to the spec.
Description
The native fetch implemented in a browser (along with node-fetch) provide a complex behaviour when processing body. Namely, in case body is a URLSearchParams object, it adds this header
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
to the request and also serializes the corresponding form data.The problem is that when intersecting the native fetch, Polly doesn't handle this case sending an empty body and a missing
type
header. Here's a link to the spec.Shareable Source
The request above is incorrectly handled by Pollyjs, here's the har content for this request:
as opposed to what's there when I export Network activity into har in Chrome:
Should Pollyjs also handle this case?
The text was updated successfully, but these errors were encountered: