-
-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: Empty response support #2191
Conversation
This feature allows to avoid spinning up HTTP server when only HTTPS one is needed. It should enable best practices in the establishing secure communication channel. Changes to `ServerConfig` type: - `server` prop renamed to `http` - nested props `jsonParser`, `upload`, `compression`, `rawParser` and `beforeRouting` moved to the top level - all that included into the automated migration (ESLint rule) for v21
This should ease declaration and enable future improvements like #2099 Making `createServer()` to return an object having `servers` property instead of `httpServer` and `httpsServer`
Due to #2137 deprecated
Make it slightly better in v21
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good, it's very straightforward now
needs only documentation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
🚀 v21.1.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ready
The following HTTP status codes imply no content in response:
First one usually used for REST deletions.
There should be an easy way to describe and such things. Basically, there is no MIME type for those cases, because there is no body.
Current obstacles:
ResultHandler::positive::mimeTypes
is currently non-empty array, eithermimeType
is a stringz.never()
is probably the best candidate for theschema
but it's unsupportedhowever,not: {}
is used for describing fixed tuples, which the best depictionConsideration:
ifnever
type should be used in the client, because of no bodyundefined
, becausenever
means that.provide()
does not return at all, such asthrow
case