public async Task Post(string url, Dictionary <string, string> queryString, Dictionary <string, string> header, Dictionary <string, string> data) { var request = mHttpHost.Post(url, header, queryString, data, new CustomuFormUrlFormater()); request.GetConnection = GetConnection; var response = await request.Execute(); if (response.Exception != null) { throw response.Exception; } }
public Task <Response> Post(Type bodyType = null) { var request = mHost.Post(RequestUrl, mHeader, mQueryString, mDataObject == null ? mDataMap : mDataObject, new T(), bodyType); request.TimeOut = TimeOut; return(request.Execute()); }
public Request GetRequest(HttpHost httpApiClient) { switch (Method) { case Request.POST: return(httpApiClient.Post(Url, Header, QueryString, Data, Formatter, Type)); case Request.PUT: return(httpApiClient.Put(Url, Header, QueryString, Data, Formatter, Type)); case Request.DELETE: return(httpApiClient.Delete(Url, Header, QueryString, Formatter, Type)); default: return(httpApiClient.Get(Url, Header, QueryString, Formatter, Type)); } }