Request Options
Request Options
All of the available options already have reasonable defaults to make the use of skrape{it} as easy and intuitive as possible.
Option | Description | Type | Default |
url | The URL that is used to fetch and parse a web page. The protocol must be | String |
|
method | Method |
| |
userAgent | String |
| |
headers | Map<String, String> | no additional custom headers will be sent by default | |
cookies | Will add Cookies to your request | Map<String, String> | will send no Cookies by default |
timeout | Sets the total request timeout duration. A timeout of zero ( | Int |
|
followRedirects | Configures the connection to (not) follow server redirects. | Boolean |
|
ignoreContentType | Ignore the document's Content-Type when parsing the response. If set to false, an unrecognized content-type will cause an IOException to be thrown. (This is to prevent producing garbage by attempting to parse a JPEG binary image, for example.) | Boolean |
|
ignoreHttpErrors | Configures the connection to not throw exceptions when a HTTP error occurs. (4xx - 5xx, e.g. 404 or 500). An IOException is thrown if an error is encountered. If set to | Boolean |
|
validateTLSCertificates | Disable/enable TLS certificates validation for HTTPS requests. All connections over HTTPS perform normal validation of certificates, and will abort requests if the provided certificate does not validate. | Boolean |
|
maxBodySize | Set the maximum bytes to read from the (uncompressed) connection into the body, before the connection is closed, and the input truncated. | Int | no maximum body size |
Last updated