Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //uri of asp.net web api
- readonly string uri = "http://192.168.1.101//WebApiDemo/api/Values";
- //This Function call in Android on button click event
- public async Task<String> GetCarsAsync()
- {
- using (HttpClient httpClient = new HttpClient())
- {
- var response = await httpClient.GetStringAsync(uri);
- return JsonConvert.DeserializeObject<String>(response);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement