public T SendPut <T, U>(string url, Parameters parameter, U content) { var uri = new Uri(HttpClientUtils.MountUrl(UrlBase, url, parameter)); var json = HttpClientUtils.Serialize <U>(content); var t = Task.Run(() => PutURI(uri, HttpClientUtils.CreateHttpContent(json))); t.Wait(); return(HttpClientUtils.Deserialize <T>(t.Result)); }
public HttpResponseMessage SendPost <T>(string url, Parameters parameter, T content) { var uri = new Uri(HttpClientUtils.MountUrl(UrlBase, url, parameter)); var json = HttpClientUtils.Serialize <T>(content); var t = Task.Run(() => PostURI(uri, HttpClientUtils.CreateHttpContent(json))); t.Wait(); return(t.Result); }