julienrf on master
Update slf4j-simple to 2.0.1 (compare)
Content-Lengthheader by default where possible be an undesirable change? Is there a reason it is not implemented now VS it just "not being there"? I'm wondering if it's something I could contribute, or if it's a matter of opinion
Option[Either[Future]]- it can return 404 or 400 or 200. - Though the
Futureto be on the outside.
sequenceon the result wasn't working at all, but traverse does work.
ResponseEntityto turn your nested
Either's into some more palatable sealed trait that better fits your domain. That way, the
Eitherstuff shows up only in the body of the endpoint definition and the type of the whole endpoint is in terms of your domain.
jsonResponsethat does not require a
Codecin that case
Eitherand having it
Left(Invalid(...))on the failure case - noticing that Invalid's the failure case of
Validated... wondering if I should be having the routes return
Throwable... I'm wondering if there's a spot that has access to both that
Throwable, and the request (at least the name of the endpoint that was called)?
localhost/foo/(but not on
endpoint( method = Get, url = path / segment() / "", response = textResponse, )
@agboom I think this use case is not covered at the moment. You may want to introduce something like the following:
def trailingSlash[A](path: Path[A]): Path[A]
Which you could use as follows:
endpoint( method = Get, url = trailingSlash(path / segment[String]()), response = textResponse )
Url.validate? It seems that only the
validateUrlis actually validated, but the
queryis ignored. Is that intentional?
Url.directivein the server interpreter, because
Directive.Segmentsdoes not match trailing slashes: https://github.com/endpoints4s/endpoints4s/blob/154e7ce630f284056f8c9ba3d8f302e326c9d696/akka-http/server/src/main/scala/endpoints4s/akkahttp/server/Urls.scala#L64
Directives.Segmentssays: "If the path has a trailing slash this slash will not be matched."