HttpClient存储在哪个程序集中

时间:2022-03-02 03:52:17

I want to use the HttpClient class from the WCF Rest Service to create a client to call rest services. I heard it was rolled into .net 4.0 but don't know the assembly it's stored in.

我想使用WCF Rest Service中的HttpClient类创建一个客户端来调用rest服务。我听说它被卷入.net 4.0,但不知道它存储的组件。

4 个解决方案

#1


16  

According to this MSDN page, it is new in .NET 4.5.

根据这个MSDN页面,它是.NET 4.5中的新功能。

"Supported in: 4.5"

“支持:4.5”

If you're on .NET 4.5, it will be in the System.Net.Http assembly.

如果您使用的是.NET 4.5,它将位于System.Net.Http程序集中。

#2


10  

While you are waiting for .net 4.5 to roll out, you can get a 4.0 version from Nuget. http://nuget.org/packages/System.Net.Http

在等待.net 4.5推出时,您可以从Nuget获得4.0版本。 http://nuget.org/packages/System.Net.Http

#3


3  

Just see the documentation:

只需查看文档:

Namespace: System.Net.Http
Assembly: System.Net.Http (in System.Net.Http.dll)

命名空间:System.Net.Http程序集:System.Net.Http(在System.Net.Http.dll中)

#4


0  

The WCF REST Starter Kit Preview 2 includes a set of classes designed to simplify interaction with REST web services. The communications are performed using the HttpClient class with the help of other types from the Microsoft.Http namespace. These types can be found in the Microsoft.Http.dll assembly located in the Assemblies folder of the starter kit.

link 1: Introduction to the HttpClient
link 2: msdn.microsoft.com
link 3: How to consume REST in C# including PUT, POST and DELETE?

WCF REST入门套件预览版2包含一组用于简化与REST Web服务交互的类。在Microsoft.Http命名空间的其他类型的帮助下,使用HttpClient类执行通信。可以在位于入门工具包的Assemblies文件夹中的Microsoft.Http.dll程序集中找到这些类型。链接1:HttpClient链接简介2:msdn.microsoft.com链接3:如何在C#中使用REST,包括PUT,POST和DELETE?

#1


16  

According to this MSDN page, it is new in .NET 4.5.

根据这个MSDN页面,它是.NET 4.5中的新功能。

"Supported in: 4.5"

“支持:4.5”

If you're on .NET 4.5, it will be in the System.Net.Http assembly.

如果您使用的是.NET 4.5,它将位于System.Net.Http程序集中。

#2


10  

While you are waiting for .net 4.5 to roll out, you can get a 4.0 version from Nuget. http://nuget.org/packages/System.Net.Http

在等待.net 4.5推出时,您可以从Nuget获得4.0版本。 http://nuget.org/packages/System.Net.Http

#3


3  

Just see the documentation:

只需查看文档:

Namespace: System.Net.Http
Assembly: System.Net.Http (in System.Net.Http.dll)

命名空间:System.Net.Http程序集:System.Net.Http(在System.Net.Http.dll中)

#4


0  

The WCF REST Starter Kit Preview 2 includes a set of classes designed to simplify interaction with REST web services. The communications are performed using the HttpClient class with the help of other types from the Microsoft.Http namespace. These types can be found in the Microsoft.Http.dll assembly located in the Assemblies folder of the starter kit.

link 1: Introduction to the HttpClient
link 2: msdn.microsoft.com
link 3: How to consume REST in C# including PUT, POST and DELETE?

WCF REST入门套件预览版2包含一组用于简化与REST Web服务交互的类。在Microsoft.Http命名空间的其他类型的帮助下,使用HttpClient类执行通信。可以在位于入门工具包的Assemblies文件夹中的Microsoft.Http.dll程序集中找到这些类型。链接1:HttpClient链接简介2:msdn.microsoft.com链接3:如何在C#中使用REST,包括PUT,POST和DELETE?