Skip to content

Conversation

@mickael-menu
Copy link
Member

Changed

Shared

  • The API of HTTPServer slightly changed to be more future-proof.

  • Remove deprecated HTTPServer API.

Copy link
Contributor

@ettore ettore left a 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 {
Copy link
Contributor

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.

Copy link
Member Author

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.

@mickael-menu
Copy link
Member Author

Thanks for reviewing @ettore 🙏

@mickael-menu mickael-menu merged commit 473ef6c into develop May 17, 2024
@mickael-menu mickael-menu deleted the fix/server-api branch May 17, 2024 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants