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
Support MethodNotAllowed via new EndpointResult #927
Conversation
4d537ac
to
e0530f5
Compare
def isMatched: Boolean = true | ||
} | ||
|
||
case object NotMatched extends EndpointResult[Nothing] { |
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 want to look into this to see if it could be modeled better so we can avoid asInstanceOf
casts in Endpoint
.
Codecov Report
@@ Coverage Diff @@
## master #927 +/- ##
==========================================
+ Coverage 82.65% 82.81% +0.15%
==========================================
Files 51 51
Lines 767 768 +1
Branches 36 39 +3
==========================================
+ Hits 634 636 +2
+ Misses 133 132 -1
Continue to review full report at Codecov.
|
e0530f5
to
1afaba2
Compare
10d8738
to
d5b849b
Compare
@sergeykolbasov Do you mind taking a look? |
efa8aac
to
5f95c28
Compare
See 10.4.6 here https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html. Looks like we also need to add |
5f95c28
to
07b5770
Compare
07b5770
to
88eb904
Compare
Sounds like a proper solution to me 👍 |
88eb904
to
6811550
Compare
6811550
to
956eaf8
Compare
This is essentially an iteration on #883 that instead of capturing a matched method as part of
Input
, introduces a newEndpointResult
case. I like this approach better because:Input
remains skinner)Endpoint.apply(Input)
for endpoint-mappers so REPL/test environments will return "not-matched" when HTTP verb is different.Example:
And then: