0

I got below issue while executing my internal project enter image description here

So I want to download System.Net.Http.WebRequest, But I am getting below issue while downloading the package using visual studio PM

enter image description here

Sravani
  • 59
  • 5
  • check your target framework, are you using .net standart or .net core? and also afaik it is not a nuget package. – MonkeyDLuffy Feb 07 '23 at 12:30
  • Get some help from comment section of [I can't install the package System.Net.Http.WebRequest](https://stackoverflow.com/questions/57321014/i-cant-install-the-package-system-net-http-webrequest) – mmushtaq Feb 07 '23 at 12:31
  • Are you creating a .net or .Net Framework program. If you add it in the reference, could it solve the issue? i.stack.imgur.com/5HJyg.png – Jiale Xue - MSFT Feb 08 '23 at 08:03
  • I am creating a c# application using .Net 7.0 – Sravani Feb 08 '23 at 09:07
  • Trying to create a c# application using .net framework. And add System.Net.Http.WebRequest in the reference. Have you tried using BorisD's suggestion? – Jiale Xue - MSFT Feb 09 '23 at 07:55
  • One of the dll internally importing the System.Net.Http.WebReques which I can't modify it – Sravani Feb 09 '23 at 11:07

1 Answers1

0

There is no need to download a package, those HTTP tools are in System.Net namespace.

You can use WebRequest.Create() to create a new WebRequest.

Anyway those methods are obsolete you should use HttpClient

Here is the doc

BorisD
  • 1,611
  • 17
  • 22