-
Notifications
You must be signed in to change notification settings - Fork 93
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
Update HTTPServer
API
#424
Conversation
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.
it looks straightforward and more cohesive to me. 👍
/// Callbacks handling a request. | ||
/// | ||
/// If the resource cannot be served, the `onFailure` callback is called. | ||
public struct HTTPRequestHandler { |
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.
nit: not that important but I was wondering why this struct and HTTPServerRequest
are not in their own files, since they are public types.
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.
I like to keep tightly related types in the same file. If HTTPServer
was a struct or class instead of a protocol, I would have used HTTPServer.Request
.
Thanks for reviewing @ettore 🙏 |
Changed
Shared
HTTPServer
slightly changed to be more future-proof.HTTPServer
API.