Skip to content
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

Merged
merged 6 commits into from
May 17, 2024
Merged

Update HTTPServer API #424

merged 6 commits into from
May 17, 2024

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. 👍

Sources/Navigator/EPUB/EPUBNavigatorViewModel.swift Outdated Show resolved Hide resolved
/// 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
6 checks passed
@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.

None yet

2 participants