public HttpDocument(ref DocumentReady document, ref HttpApi http, HttpContentItem item) : base(document.Data)
            {
                try
                {
                    SetResponse(item, http.GetAllResponseHeaders());
                }
                catch (Exception ex)
                {
                    Console.WriteLine(ex.Message);
                    SetResponse(item, "");
                }

                item.Data = this.Data;
            }
Beispiel #2
0
 public HttpDocument(ref DocumentReady document, ref HttpApi http, HttpContentItem item) : base(document.Data)
 {
     SetResponse(item, http.GetAllResponseHeaders());
     item.Data = this.Data;
 }
Beispiel #3
0
 private void SetResponse(HttpContentItem item, string headers)
 {
     response            = item;
     response.CookiesDic = response.CookiesDic.Union(HttpApi.GetAllCookies(headers)).ToDictionary(items => items.Key, items => items.Value);
     response.Headers    = headers;
 }
Beispiel #4
0
 public HttpDocument(object responseBody, string headers, HttpContentItem item) : base(responseBody)
 {
     SetResponse(item, headers);
     item.Data = this.Data;
 }