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

Make HttpServer an open class for customization #443

Merged
merged 2 commits into from
Mar 6, 2020

Conversation

cobbal
Copy link
Contributor

@cobbal cobbal commented Feb 27, 2020

Turn HttpServer into an open class to allow for slightly more
customization than the middleware property allows.

For my particular use case, I'm trying to add some simple logging, which
would be an easy thing to do if I could just put a small wrapper around
dispatch.

I only made the dispatch method open here, since it seems like an
obviously good customization point that would need inheritance instead
of containment to customize.

Turn `HttpServer` into an open class to allow for slightly more
customization than the `middleware` property allows.

For my particular use case, I'm trying to add some simple logging, which
would be an easy thing to do if I could just put a small wrapper around
`dispatch`.

I only made the `dispatch` method open here, since it seems like an
obviously good customization point that would need inheritance instead
of containment to customize.
@swifter-bot
Copy link

swifter-bot commented Feb 27, 2020

1 Message
📖 Hey, @cobbal 👋.

Generated by 🚫 Danger

@Vkt0r Vkt0r self-requested a review March 6, 2020 15:58
Copy link
Member

@Vkt0r Vkt0r left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cobbal Thanks for taking the time to create this PR. It looks good! The Linux job needs modification as CircleCI is not running the machine, that's why the job is failing.

@Vkt0r Vkt0r merged commit fbffd02 into httpswift:stable Mar 6, 2020
tomieq pushed a commit to tomieq/swifterfork that referenced this pull request Apr 1, 2021
Make HttpServer an open class for customization
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