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
If the request headers has content-type and the body is empty, Fastify does not process the request and returns an error.
Is there a reason to set content-type: application/json as the default headers?
The text was updated successfully, but these errors were encountered:
I thought that all JSON APIs expected "Content-Type": "application/json"? This is the first I’ve heard of it causing issues.
But you do have a good point which is it’s impossible to unset default headers in the client. While I think "Content-Type": "application/json" is a good default, you should still be able to unset that if desired.
https://github.com/drwpow/openapi-typescript/blob/ad894a5697f852709c745c22e974991b9b8b4925/packages/openapi-fetch/src/index.ts#L3C8-L3C8
If the request headers has content-type and the body is empty, Fastify does not process the request and returns an error.
Is there a reason to set content-type: application/json as the default headers?
The text was updated successfully, but these errors were encountered: