public HttpResponse Submit(HttpRequest request) { try { var webRequest = HttpRequestHelper.Create(request, Uri, _version); HttpRequestHelper.AddCredentials(webRequest, Credentials); HttpRequestHelper.AddProxy(webRequest, Credentials.WebProxy); HttpRequestHelper.AddContent(webRequest, request); var webResponse = webRequest.GetResponse(); return(HttpResponseHelper.Create(webResponse)); } catch (WebException exception) { return(HttpResponseHelper.Create(exception)); } }
public HttpResponse Submit(HttpRequest request) { try { IHttpWebRequestAdapter webRequest = HttpRequestHelper.Create(request, Uri); HttpRequestHelper.AddCredentials(webRequest, Credentials); HttpRequestHelper.AddProxy(webRequest, Credentials.WebProxy); HttpRequestHelper.AddContent(webRequest, request); IHttpWebResponseAdapter webResponse = (IHttpWebResponseAdapter)webRequest.GetResponse(); return(HttpResponseHelper.Create(webResponse)); } catch (WebException exception) { return(HttpResponseHelper.Create(exception)); } }