julienrf on master
Update slf4j-simple to 2.0.1 (compare)
Content-Lengthis not specified, and endpoints4s was not setting that header. Does this qualify as a bug of some sort, or should I be setting this header myself? The bug is "fixed" on my end by using Blaze as my http4s backend, which defaults to chunked encoding, but I believe endpoints4s should also be setting the content-length header.
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 )