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

Obsolete old HTTP APIs #33125

Closed
4 tasks done
scalablecory opened this issue Mar 3, 2020 · 8 comments · Fixed by dotnet/dotnet-api-docs#4731
Closed
4 tasks done

Obsolete old HTTP APIs #33125

scalablecory opened this issue Mar 3, 2020 · 8 comments · Fixed by dotnet/dotnet-api-docs#4731
Assignees
Labels
area-System.Net.Http documentation Documentation bug or enhancement, does not impact product or test code
Milestone

Comments

@scalablecory
Copy link
Contributor

scalablecory commented Mar 3, 2020

ObsoleteAttribute will be getting an update to support diagnostic IDs and URLs to help IDEs better manage obsolete API usage.

We should consider annotating WebRequest and WebClient with this. I frequently see asks for help with HTTP in .NET, and it's not uncommon to find them using one of these APIs without knowing we prefer them use HttpClient instead.

Something like

    [Obsolete(DiagnosticId="BCL1234", UrlFormat="https://aka.ms/obsoletedotnethttp")]
    public class WebRequest // Also: HttpWebRequest, FtpWebRequest, FileWebRequest (aka *WebRequest)
    {
    }

    [Obsolete(DiagnosticId="BCL1234", UrlFormat="https://aka.ms/obsoletedotnethttp")]
    public class WebClient
    {
    }

I would not want to create excessive warnings for users porting Framework apps to .NET 5, so this is predicated on IDE/compiler being updated to allow ignoring specific diagnostic IDs application-wide.

@scalablecory scalablecory added this to the 5.0 milestone Mar 3, 2020
@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added area-System.Net.Http untriaged New issue has not been triaged by the area owner labels Mar 3, 2020
@scalablecory scalablecory removed the untriaged New issue has not been triaged by the area owner label Mar 3, 2020
@karelz karelz added enhancement Product code improvement that does NOT require public API changes/additions documentation Documentation bug or enhancement, does not impact product or test code and removed enhancement Product code improvement that does NOT require public API changes/additions labels May 29, 2020
@karelz
Copy link
Member

karelz commented Aug 20, 2020

@scalablecory can you please provide guidance / options here? (the latest status of this feature)

@jeffhandley
Copy link
Member

I left some feedback on #41526 that likely applies to all of the obsoletions here. I'll take a look at the other PRs though.

@karelz
Copy link
Member

karelz commented Aug 31, 2020

Fixed in 6.0 in PR #41400

Note: Porting to 5.0 was rejected this late in the game -- see #41526

@karelz karelz closed this as completed Aug 31, 2020
@aik-jahoda
Copy link
Contributor

Reopening to help track the documentation.

@aik-jahoda aik-jahoda reopened this Aug 31, 2020
@jeffhandley
Copy link
Member

When this is worked on to track the documentation, please also see #41759, where I provided some other feedback.

@ghost ghost locked as resolved and limited conversation to collaborators Dec 10, 2020
@gewarren
Copy link
Contributor

gewarren commented Apr 26, 2021

Should this have been closed by dotnet/dotnet-api-docs#4731? The literal comment is partially fixes #33125. The dotnet/docs PR is still in draft, and the aka.ms link wasn't updated. However, with dotnet/docs#23915, perhaps it should be redirected to the new SYSLIB0014 article instead.

@jeffhandley
Copy link
Member

Probably not -- that might have been a false positive auto-close because of fixes #33125.

I do think this will get wrapped up with dotnet/docs#23915 though, and when the SYSLIB0014 page is published, we will need to update the aka.ms link. I'll reopen this to make sure it gets tracked.

@jeffhandley jeffhandley reopened this Apr 26, 2021
@jeffhandley
Copy link
Member

The documentation page is in place and the aka.ms link is configured to point to it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Net.Http documentation Documentation bug or enhancement, does not impact product or test code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants