Exemplo n.º 1
0
        public WebRequestResult(HttpWebRequest pRequest, ProxyTranslation pTranslation, AsyncCallback pCallback, HttpContext pContext, object pState)
        {
            context = pContext;
            _request = pRequest;
            _callback = pCallback;
            translation = pTranslation;
            IsCompleted = false;
            AsyncState = pState;

            if (_request.Method.Equals("POST", StringComparison.InvariantCultureIgnoreCase))
                _request.BeginGetRequestStream(new AsyncCallback(AsyncReturnStream), this);
            else
                _request.BeginGetResponse(new AsyncCallback(AsyncReturn), this);
        }
Exemplo n.º 2
0
 private void _AddHeadersToResponse(WebResponse pResponse, HttpContext pContext, ProxyTranslation pTranslation)
 {
     foreach (string _header in GetFilteredHeaders(pTranslation.headers, pResponse.Headers.AllKeys))
         pContext.Response.AddHeader(_header, pResponse.Headers[_header]);
 }
Exemplo n.º 3
0
 public void Add(ProxyTranslation pTranslation)
 {
     BaseAdd(pTranslation);
 }