2017-10-09 17 views

答えて

0

あなたは新しい質問を投稿する前に、既存の検索、

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"); 
} 

のコード例を使用することができます

関連する問題