简体   繁体   English

Xamarin PCL和HttpClient的Microsoft.Net.Http在Android AND iOS上受支持吗?

[英]Xamarin PCL and Microsoft.Net.Http for HttpClient is this supported on Android AND iOS?

There seem to be a lot of conflicting statements out there with regard to my question. 关于我的问题,似乎有很多矛盾的说法。 I have a PCL project that I have added the Microsoft.Net.Http package to in order to consume a WepAPI, will this work on both my Android and iOS app? 我有一个PCL项目,我已经添加了Microsoft.Net.Http包以使用WepAPI,这在我的Android和iOS应用程序上都可以工作吗? Thank you in advance. 先感谢您。

If you choose a newer PCL profile, you don't even need to add the NuGet package and you can just use HttpClient directly. 如果选择较新的PCL配置文件,则甚至不需要添加NuGet包,而可以直接使用HttpClient。

To answer your question, yes this will work. 要回答您的问题,是的,这将起作用。 Even with the HttpClientHandler's which Xamarin provides. 即使使用Xamarin提供的HttpClientHandler。 It will also work with ModernHttpClient. 它还将与ModernHttpClient一起使用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM