runtime icon indicating copy to clipboard operation
runtime copied to clipboard

Not able to find Referer property in HttpWebRequest

Open navikale opened this issue 9 years ago • 2 comments

I have portable class library pointing .Net Standard libraries (versions below). HttpWebRequest in System.Net.Requests library does not have Referer property and many other members. And confusing thing is Github source does have all the members. Is this issue assembly packaged with Nuget ?

Microsoft.NETCore.Portable.Compatibility: 1.0.2 NETStandard.Library: 1.6.1 System.Net.Http: 4.3.2 System.Net.Requests: 4.3.0 netstandard: 1.6

Below is HttpWebRequest metadata httpwebrequest_metadata

navikale avatar Jun 03 '17 02:06 navikale

The Referer property was added back for .NET Core 2.0 and .NET Standard 2.0. Unfortunately it wasn't available in standard before that. https://github.com/dotnet/corefx/commit/9090df761a1a067c869e43066ba32fd39a26f516

stephentoub avatar Jun 03 '17 12:06 stephentoub

Thanks for the update. I have resolved issue to set Referer by invoking private method SetSpecialHeader. Still figuring out solution for AutomaticDecompression, seems that gets passed to handler. Let me know if there is workaround using reflaction.

navikale avatar Jun 09 '17 19:06 navikale