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 new class to improving handling of URLs #742

Open
jrfnl opened this issue May 24, 2022 · 0 comments
Open

Add new class to improving handling of URLs #742

jrfnl opened this issue May 24, 2022 · 0 comments

Comments

@jrfnl
Copy link
Member

jrfnl commented May 24, 2022

Both the Curl as well as the Fsockopen class contain a format_get() method which build a URL from parts.
These methods are inconsistent and handle the URL building slightly differently.

If I remember correctly, there are also other places in the Requests code where URLs are split/rebuild in various ways.

We should look into creating a class to handle this properly and consistently for all places this kind of functionality is needed in Requests.

That class should make use of the Iri class for splitting URLs and should contain a consistent way to (re)build a URL.

Separating this type of logic out to a separate class will reduce code duplication, reduce technical debt and improve the testability of the logic involved.

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

1 participant