Replace `Http4sDsl.Path` with `Uri.Path`
See original GitHub issueFollow-up from Gitter discussion:
We are recreating an Http4sDsl.Path
from a Uri.Path
every time we call ->
in the DSL. This is inefficient and confusing.
We should be able to eliminate Http4sDsl.Path
, replace Http4sDsl.Root
with Uri.Path.Root
, and replace Http4s.Dsl./
with an extractor in the spirit of the existing /:
.
Incomplete, sloppy proof of concept: https://github.com/rossabaker/http4s/commit/57ff176221b0c695bc3f604b370cbbcaa0e97387
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (7 by maintainers)
Top Results From Across the Web
The http4s DSL
uri.path allows multiple services to be composed without rewriting all the path matchers. Matching paths. A request to the root of the service ......
Read more >http4s/http4s - Gitter
This is the path in the DSL, not the path in the URI. Which is another questionable point, I think. scala> val p:...
Read more >Routes with `"" /:` don't match in 0.20 · Issue #2273 - GitHub
_ import org.http4s.dsl.Http4sDsl import org.http4s.implicits. ... for a proposed change to make the behavior of "" /: path more consistent.
Read more >http4s client create Uri from a string - scala - Stack Overflow
I cleaned them up a bit for you: libraryDependencies ++= Seq( "org.http4s" %% "http4s-core" % "0.15.3", "org.http4s" ...
Read more >Unleashing the Power of HTTP Apis: The Http4s Library
So, we change the previous route definition in Request => F[Response] . ... Path : // From the Http4s DSL object -> {...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This work will have to target
main
. I don’t think there is any way to do it in a binary-compatible fashion.And I was mistaken on Gitter the other day when I said our
->
extractor has nothing to do with HTTP: it operates specifically on aRequest
, and does belong in the HTTP library.