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
It feels very logical to us for a default Content-Type': 'application/json' header to be assumed if there are any requestBodyParams. Reasoning being that currently, in the fetch template, the body is provided through JSON.stringify(), but not all services accept the payload if you don't pass the header. I do realize these can simply be passed through options (either per request/global), but the default seems sensible.
Let me know how you feel about it, happy to provide a PR.
The text was updated successfully, but these errors were encountered:
RobbyUitbeijerse
changed the title
Content-Type header with application/json should be assumed if the default is to stringify the boyd
Content-Type header with application/json should be assumed if there is a request body
Jul 19, 2024
The fetch client doesn't yet support cases other than application/json, such as multipart/form-data and application/x-www-form-urlencoded so i'll do this by following response.
Hello!
It feels very logical to us for a default
Content-Type': 'application/json'
header to be assumed if there are anyrequestBodyParams
. Reasoning being that currently, in the fetch template, the body is provided throughJSON.stringify()
, but not all services accept the payload if you don't pass the header. I do realize these can simply be passed through options (either per request/global), but the default seems sensible.Let me know how you feel about it, happy to provide a PR.
The text was updated successfully, but these errors were encountered: