public HttpPlasmaResponse(AspNetResponse response) { this.response = response; }
public PlasmaDom(AspNetResponse response) { this.response = response; this.html = response.Html(); }
public void NavigateTo(string location) { currentResponse = webApplication.ProcessRequest(location); }
private void ExtractCookies(AspNetResponse response) { if (cookieContainer == null) return; foreach (var cookie in response.CookieHeader) { cookieContainer.SetCookies(new Uri("http://localhost"), cookie); } }
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; }