0
-
蔭新Xamarin,如何調用兩個Web服務的ios和android 單代碼段。如何在xamarin中爲ios和android調用comon web服務?
蔭新Xamarin,如何調用兩個Web服務的ios和android 單代碼段。如何在xamarin中爲ios和android調用comon web服務?
您發表新問題之前,搜索現有的,
consuming a php webservice in Xamarin PCL
複製!
順便說一句,你可以使用來自http://jonathanpeppers.com/Blog/improving-http-performance-in-xamarin-applications
採取的HttpClient//Use this class as a singleton in an IoC container
class MyAppClient
{
readonly HttpClient _httpClient = new HttpClient();
public async Task<string> GetChuck()
{
return await _httpClient.Get("http://chucknorris.com");
}
}
//Although "using" is good in general, don't do this
using (var httpClient = new HttpClient())
{
return await _httpClient.Get("http://chucknorris.com");
}
代碼示例