Closed adam12 closed 2 years ago
This looks good to me.
We could also have an optional path argument that defaults to "/"
. What do you think?
I probably would have preferred to do it that way, but this seemed like the path of least resistance.
If you're open to adding an optional path
argument with a default, I could submit a PR.
It’s totally up to you but it makes sense to me.
When using Endpoint.parse, the generated URL is normalized before passing to the constructor, resulting in a
path
attribute of/
by default.When using Endpoint.for, the path is left as an empty String, which causes issues in some web servers. To make the behaviour consistent, Endpoint.for will normalize as well.