You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
@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.
@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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR deprecates
net/urlas discussed in #2464.CC: @DarrenN, @jeapostrophe, @greghendershott