public async void LoadProfile() { var response = await MyApiService.GetRequest("/profile/"); this.Response = await response.Content.ReadAsStringAsync(); this.ProfileData = JsonConvert.DeserializeObject <Profile>(this.Response); }
public async void AttemptLogin() { var json = JsonConvert.SerializeObject(AttemptingUser); var response = await MyApiService.PostRequest("/auth/login/", json); this.Response = await response.Content.ReadAsStringAsync(); var accessToken = JsonConvert.DeserializeObject <AccessToken>(this.Response).Value; Application.Current.Properties["token"] = accessToken; this.Response = accessToken; }