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

Fully featured Url parser #1082

Closed
Chrys4lisfag opened this issue Jul 14, 2024 · 1 comment
Closed

Fully featured Url parser #1082

Chrys4lisfag opened this issue Jul 14, 2024 · 1 comment
Assignees

Comments

@Chrys4lisfag
Copy link

Chrys4lisfag commented Jul 14, 2024

Is your feature request related to a problem?

When working with requests error handling in interceptors, when trying to find trusted CA by domain etc it's very inconvenient without complete Url parser.

While working with boost, I found it's Url parser very convenient and helpful.
I don't want to use any standalone uri parsers in my project or use boost, so when it comes to the need of replacing domain on failure or get linked CA from map<domain, ca> I have to create some string parsing crutches every time that of course can lead to errors due to not using complete Url parsing.

Possible Solution

Add something similar to this.
https://www.boost.org/doc/libs/1_84_0/libs/url/doc/html/url/urls/containers.html

Minimal musthave(set\get):
port
host (w/o protocol)
path
scheme(http\https\etc)

Session:
API work with current Url: set new Url, get url, get mutable reference(?)(so no need to get copy->modify copy->set new url)

Alternatives

No response

Additional Context

No response

@COM8
Copy link
Member

COM8 commented Jul 21, 2024

I think curl_url_set is the function you are looking for (https://curl.se/libcurl/c/curl_url_set.html).

Here is an example for getting the curl object:
#1057 (comment)

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

No branches or pull requests

2 participants