warrenday / graphql-network-inspector

A better network inspector for viewing and debugging GraphQL requests.
MIT License
484 stars 47 forks source link

fallback for parsing form data #102

Closed warrenday closed 1 year ago

warrenday commented 1 year ago

It's possible to post graphql requests using form-data. In this case parsing the request body as JSON will fail.

Instead, if JSON.parse fails, we can fallback to checking the content-type header and choosing to parse as form-data using a new custom function that parses the payload.

Screenshot 2023-05-18 at 17 38 03