Response
Whenever you call the response
function of the skrape{it} DSL it will take the given request config and performs a HTTP request by the use of the given fetcher.
The response of a call done by a fetcher will be represented in a Result
object.
A result comes with a bunch of basic fields as well as some handy DSL functions
Fields
Name | Description | Type |
responseBody | The response body as raw String representation. At this point it can be everything from HTML to XML, JSON or even plain text. | String |
The HTTP requests response status containing the status code and message. See Status documentation for more information. | ||
contentType | The value of the HTTP requests Content-Type response header. | String |
headers | Contains all the HTTP headers of the response. Additional headers with name duplicates will be ignored. | Map<String, String> |
List of all given cookies. See Cookies documentation for more information. | List<Cookie> | |
baseUri | The | String |
The html-parser artifact provides extension functions to directly parse the responseBody String to Html document (Doc
object) that represents the html tree based on DocElements
.
Functions
Last updated