private void ProcessAsyncRequest(HttpWebProxyRequest httpWebProxyRequest, IAsyncResult asyncResult) { Stream requestStream = null; try { requestStream = httpWebProxyRequest.HttpWebRequestBase.EndGetRequestStream(asyncResult); httpWebProxyRequest.ProcessRequestStream(httpWebProxyRequest.RequestBytes, requestStream); } finally { if (requestStream != null) { requestStream.Close(); } } httpWebProxyRequest.HttpWebRequestBase.BeginGetResponse(new AsyncCallback(GetResponseCallback), httpWebProxyRequest); }
private void ProcessRequest(HttpWebProxyRequest httpWebProxyRequest) { Stream requestStream = null; try { requestStream = httpWebProxyRequest.HttpWebRequestBase.GetRequestStream(); httpWebProxyRequest.ProcessRequestStream(httpWebProxyRequest.RequestBytes, requestStream); } finally { if (requestStream != null) { requestStream.Close(); } } }