0
我一直在寻找遍布xamarin网站,并且有几十种方式来调用Web服务。到现在为止,每次我尝试重复教程中的示例时,都会出现问题。那么,怎样才能我只是调用PHP Web服务,它返回我JSON,我可以工作吗?如何在Xamarin.PCL项目中调用Web服务
这里是我做过什么:
private async Task<JsonValue> Connexion_Webservice(string url)
{
// Creates the HTTP Request
HttpWebRequest requete = (HttpWebRequest)HttpWebRequest.Create(new Uri(url));
requete.ContentType = "application/json";
requete.Method = "GET";
//Sends the request and wait for the response
using (WebResponse response = await requete.BeginGetResponse()
{
// until here I dont know what to do, what should I do ? ;
}
}