protected async Task <T> PutAsync <T>(string resourceEndpoint, IFilter filter = null, RequestFormat requestFormat = RequestFormat.Json) { var message = new HttpRequestMessage(HttpMethod.Put, string.Format("{0}/{1}", BaseUri, resourceEndpoint)); message.Content = new StringContent("", System.Text.Encoding.UTF8, requestFormat.GetStringValue()); var response = await ExecuteRequest <T>(message, filter); return(response.Data); }
protected async Task <TResponse> PatchDataAsync <TRequest, TResponse>(string resourceEndpoint, TRequest data, IFilter filter = null, RequestFormat requestFormat = RequestFormat.Json) { var message = new HttpRequestMessage(new HttpMethod("PATCH"), string.Format("{0}/{1}", BaseUri, resourceEndpoint)); message.Content = new StringContent(JsonConvert.SerializeObject(data), System.Text.Encoding.UTF8, requestFormat.GetStringValue()); var response = await ExecuteRequest <TResponse>(message); return(response.Data); }