Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more "ergonomic" functions for safely constructing URLs #2

Open
andywhite37 opened this issue Oct 22, 2019 · 0 comments
Open

Add more "ergonomic" functions for safely constructing URLs #2

andywhite37 opened this issue Oct 22, 2019 · 0 comments

Comments

@andywhite37
Copy link
Member

andywhite37 commented Oct 22, 2019

Right now, there is a lot of type/constructor heaviness in the APIs, so it would be nice to have a more friendly set of functions for safely constructing and manipulating URLs.

The goal would be to have a recommended way to "parse" a URL into our data structure using a string (and return an Option/Result), and a goal to safely construct a URL from it's parts in a nice clean way, which would ideally not require the use of Option/Result. However, since most parts of the URL are strings, it becomes hard to guarantee that the URL is valid and not use Option/Result (or throw exceptions).

We'll always have the parseExn style API for URLs, but if we can avoid that being the default use-case, it would be best.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant