Skip to content

Conversation

@aik-jahoda
Copy link
Contributor

@aik-jahoda aik-jahoda commented Aug 26, 2020

This PR obsoletes only construction methods to reduce amount of warning and focus to entry point of usage of the obsoleted classes.

One of the PR for #33125

@ghost
Copy link

ghost commented Aug 26, 2020

Tagging subscribers to this area: @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

}

[Obsolete("Serialization is obsoleted for this type. https://go.microsoft.com/fwlink/?linkid=14202")]
[Obsolete(Obsoletions.WebRequestMessage, DiagnosticId = Obsoletions.WebRequestDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HttpClient does not support file URIs

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have an alternative api for fie URIs?

It will warn even I remove this line if the FileWebRequest is created by WebRequest.Create() / CreateDefault.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The closest API we have is for a user to call Uri.LocalPath and use File.Open. It should still be obsoleted, but a message of "use HttpClient" doesn't make sense.

@scalablecory scalablecory mentioned this pull request Aug 28, 2020
4 tasks
@aik-jahoda aik-jahoda requested a review from a team August 28, 2020 10:31
@aik-jahoda aik-jahoda force-pushed the jajahoda/obsolettewebrequest branch from dc85370 to 11bb04e Compare August 28, 2020 10:34
Comment on lines 7 to 8
<IgnoreForCI Condition="'$(T
argetOS)' == 'Browser'">true</IgnoreForCI>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like there is an unnecessery weird line break:

'$(T
argetOS)'

@aik-jahoda aik-jahoda merged commit 9b79ee6 into dotnet:master Aug 28, 2020
@aik-jahoda aik-jahoda deleted the jajahoda/obsolettewebrequest branch August 28, 2020 18:11
@aik-jahoda aik-jahoda requested a review from ericstj August 28, 2020 18:20
@aik-jahoda
Copy link
Contributor Author

/backport to release/5.0

@aik-jahoda aik-jahoda removed the request for review from ericstj August 28, 2020 18:30
@github-actions
Copy link
Contributor

@ghost ghost locked as resolved and limited conversation to collaborators Dec 7, 2020
@karelz karelz added this to the 6.0.0 milestone Jan 26, 2021
@gewarren
Copy link
Contributor

@aik-jahoda Because the type itself isn't obsoleted, the API ref docs don't show it as being obsolete. This doesn't seem like a good user experience for the docs. How much would the extra warnings affect customers if we added the Obsolete attribute to the type as well?

@wfurt
Copy link
Member

wfurt commented Jul 12, 2022

cc: @karelz related to #62770. Perhaps too late for 7.0. In general we probably want to obsolete all

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants