Effect CommunityEC
Effect Community16mo ago
3 replies
whatplan

Discussion on Correct Usage of URL Parsing in ServerRequest and Naming Conventions

https://github.com/Effect-TS/effect/blob/main/packages/platform/src/internal/httpMiddleware.ts#L194

should this not be
const params = ServerRequest.searchParamsFromURL(new URL(request.originalUrl))


because the ServerRequest.url is stripped right?

---

(side note why is there this ServerRequest.url vs ServerRequest.originalUrl)?
To mean it seems like a bad idea to stray from the way the web standard Request works with
url
(although I am sure there is a reason it was done this way)

I would think we would use a new word for the "parsed" url like how nextjs does it: NextRequest.pathname
Was this page helpful?