Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static async Task<bool> SignIn(string userName, string password)
- {
- var user = new { UserName = userName, Password = password };
- // HttpResponseMessage response = await CallAPI(client => client.PostAsJsonAsync("api/account/SignIn", user));
- HttpResponseMessage response = await CallAPI(client => client.PostAsync("api/AgentCollection", new StringContent(new JavaScriptSerializer().Serialize(user), Encoding.UTF8, "application/json")));
- bool result = false;
- if (response.IsSuccessStatusCode)
- {
- result = await response.Content.read.ReadAsAsync<bool>();
- }
- return result;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement