-
-
Notifications
You must be signed in to change notification settings - Fork 414
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
Add Host
API combinator
#1800
base: master
Are you sure you want to change the base?
Add Host
API combinator
#1800
Conversation
Great idea. |
@Daniel-Diaz Hi! Thanks for the contribution. Would you mind rebase your branch on the current |
I think I did. Does it look ok? |
@Daniel-Diaz Fantastic. Would you mind adding it to the test suite? Right here: https://github.com/haskell-servant/servant/blob/master/servant-client/test/Servant/ClientTestUtils.hs#L223 |
I added an entry to the testing API referenced here. |
@Daniel-Diaz Excellent, thank you. Would you mind adding a changelog entry like this one? |
I just added the changelog file. Let me know if it looks correct. |
This combinator allows you to select or restrict APIs according to the provided hosts. For example:
I implemented it as far as it was needed to make it work, i.e. adding
HasClient
andHasServer
instances. If you want me to add support in more places, let me know.