here is some code which i tried but it doesnt work //my method from web service [WebMethod] public string TempTestAPI(string str1,string str2) { string strreturn = string.Empty;
using (var client = new HttpClient())
using (var content = new MultipartFormDataContent())
{
client.BaseAddress = new Uri(http://localhost:4040);
//call to API
var result = client.PostAsync("api/GetString", content).Result;
var strdictid = result.Content.ReadAsStringAsync().Result;
}
return strreturn;
}
Aucun commentaire:
Enregistrer un commentaire