8000
Skip to content

Closes #2464: deprecate net/url#3125

Closed
sorawee wants to merge 1 commit intoracket:masterfrom
sorawee:deprecate-net-url
Closed

Closes #2464: deprecate net/url#3125
sorawee wants to merge 1 commit intoracket:masterfrom
sorawee:deprecate-net-url

Conversation

@sorawee
Copy link
Copy Markdown
Collaborator
@sorawee sorawee commented Apr 23, 2020

This PR deprecates net/url as discussed in #2464.

CC: @DarrenN, @jeapostrophe, @greghendershott

@mflatt
Copy link
Copy Markdown
Member
mflatt commented Apr 23, 2020

I think a good change will require more than this deprecation label. For one thing, this section of the documentation also houses net/url-structs (in a subsection), which is not covered by net/http-client, so the deprecation claim is misleading. For another, net/http-client doesn't cover all of the functionality of net/url, such as handling redirections.

I don't know how much an improvement will involve reorganizing documentation versus adding more functionality to net/http-client versus introducing a new module that has just the good parts of net/url not covered by net/http-client and net/url-structs — but it will be some combination of that.

@sorawee
Copy link
Copy Markdown
Collaborator Author
sorawee commented Apr 23, 2020

Agreed. Let me close this PR then since the actual change needs to be a lot more involved than this.

@sorawee sorawee closed this Apr 23, 2020
@sorawee sorawee deleted the deprecate-net-url branch April 23, 2020 16:13
@samth
Copy link
Copy Markdown
Member
samth commented Apr 23, 2020

My feeling is similar to @mflatt. Just fetching data from a url is still easier with net/url. My sense is the right thing is a library that's easier than net/url, supports all the features from net/http-client, and resembles high-quality HTTP request libraries in other languages, such as Python's request, Rust's reqwest, or Clojure's clj-http.

@sorawee
Copy link
Copy Markdown
Collaborator Author
sorawee commented Dec 30, 2023

@Bogdanp does http-easy support everything that net/url / net/http-client does? If so, I think we should revive this PR, but point toward http-easy instead.

@Bogdanp
Copy link
Copy Markdown
Contributor
Bogdanp commented Dec 30, 2023

@sorawee While http-easy implements a superset of the HTTP-related functionality in both modules, it doesn't reprovide any of the URL-specific functionality from net/url-{structs,string,unit,sig} (which are useful even outside of an HTTP context (eg. file, git, ftp, and so on, URLs)). So, I don't think it would be right to call all of net/url deprecated in favor of http-easy, but maybe it would make sense to add pointers to net/http-client (as a lower-level interface to HTTP) and net/http-easy (as a higher-level interface) under the URL Functions section of the net/url docs, which is where most of the HTTP-related procedures are documented afaict.

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

Successfully merging this pull request may close these issues.

4 participants

0