public async Task<PostsResponse> UpdatePostAsync(string id, NewPost post) { var result = await _webManager.PutData(new Uri(string.Format(Endpoints.UpdateDeletePost, id)), null, new StringContent(JsonConvert.SerializeObject(post), Encoding.UTF8, "application/json")); return JsonConvert.DeserializeObject<PostsResponse>(result.ResultJson); }
public async Task<PostsResponse> CreateNewPostAsync(NewPost post) { var result = await _webManager.PostData(new Uri(Endpoints.CreateByte), null, new StringContent(JsonConvert.SerializeObject(post), Encoding.UTF8, "application/json")); return JsonConvert.DeserializeObject<PostsResponse>(result.ResultJson); }