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
In some cases I'd like to be able to make the body of a request optional. This seems to work as expected with @TypedBody, with the exception of it enforcing a check for a Content-Type of application/json:
I would argue that specifically in the case of a request with no body, there should be no expectation of a Content-Type header and therefore we should bypass this check. It would then be up to the validator to make a determination of whether this empty body is permissible.
The text was updated successfully, but these errors were encountered:
Feature Request
In some cases I'd like to be able to make the body of a request optional. This seems to work as expected with
@TypedBody
, with the exception of it enforcing a check for aContent-Type
ofapplication/json
:nestia/packages/core/src/decorators/TypedBody.ts
Lines 38 to 41 in 807474a
I would argue that specifically in the case of a request with no body, there should be no expectation of a
Content-Type
header and therefore we should bypass this check. It would then be up to the validator to make a determination of whether this empty body is permissible.The text was updated successfully, but these errors were encountered: