Beispiel #1
0
 public HttpPlasmaResponse(AspNetResponse response)
 {
     this.response = response;
 }
Beispiel #2
0
 public PlasmaDom(AspNetResponse response)
 {
     this.response = response;
     this.html = response.Html();
 }
Beispiel #3
0
 public void NavigateTo(string location)
 {
     currentResponse = webApplication.ProcessRequest(location);
 }
Beispiel #4
0
        private void ExtractCookies(AspNetResponse response)
        {
            if (cookieContainer == null) return;

            foreach (var cookie in response.CookieHeader)
            {
                cookieContainer.SetCookies(new Uri("http://localhost"), cookie);
            }
        }
Beispiel #5
0
 private AspNetResponse FollowAnyRedirect(AspNetResponse response)
 {
     if (response.Status == 302 || response.Status == 301)
     {
         var location = response.Headers.First(x => x.Key == "Location").Value;
         var locationUri = new Uri(location, UriKind.RelativeOrAbsolute);
         var url = locationUri.IsAbsoluteUri ? locationUri.PathAndQuery : location;
         var request = new AspNetRequest(url, null, null, "GET", CreateRequestHeaders(new WebHeaderCollection()), null);
         return ProcessRequest(request);
     }
     return response;
 }
 public HtmlNavigator(AspNetResponse response)
 {
     _response = response;
 }