Advertisement
Guest User

Untitled

a guest
Jul 4th, 2016
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. public async Task<LoginUser[]> GetUserAsync()
  2. {
  3.  
  4. var client = new System.Net.Http.HttpClient();
  5. client.BaseAddress = new Uri("http://developer-platform.com/dutyfreebuzz/web_services/Login");
  6. StringContent str = new StringContent("username=admin&password=12345", Encoding.UTF8, "application/x-www-form-urlencoded");
  7. var response = await client.PostAsync(new Uri("http://developer-platform.com/dutyfreebuzz/web_services/Login/loginJSON"), str);
  8. var loginJson = await response.Content.ReadAsStringAsync();
  9. Rootobject rootobject = new Rootobject();
  10. if (loginJson != "")
  11. {
  12. //rootobject = JsonConvert.DeserializeObject<Rootobject>(loginJson);
  13. }
  14. //return rootobject.loginusers;
  15.  
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement