public async Task <Bitmap> DeleteAvatar() { Bitmap avatar = null; HttpResponseMessage response = await RequestsBL.DELETERequest(string.Empty, Constants.AvatarRequestStub); //after deleting, reloads the default image for this user if (response != null) { if (response.IsSuccessStatusCode) { avatar = await GetAvatar(RequestsBL.User.userId, 400); } } return(avatar); }
public async Task <JObject> DeleteRoom(Room Room) { HttpResponseMessage response = await RequestsBL.DELETERequest(string.Format("/room/{0}/participants/self", Room.token), Constants.BaseRequestStub); if (response != null) { if (response.IsSuccessStatusCode) { return(RequestsBL.DeserializeResponse(XDocument.Parse(await response.Content.ReadAsStringAsync()), ocsPointer)); } else { return(null); } } else { return(null); } }