Request
Represents a request builder Example usage:
Request()
.protocol(RequestProtocol.HTTPS)
.host("google.com")
.path("/search")
.parameter("q", "Hello World")
.send()
or
Request("https://google.com/search?q=Hello%20World")
.send()
Properties
Follow redirects Default: true
The headers of the request Default: User-Agent, Accept
The maximum number of redirects to follow Default: -1
The request method Default: GET
The parameters of the request Default: Empty map
The protocol to use (http, https) Default: https
The timeout for reading the response in millisecond Default: 0 (No timeout)
Functions
Adds the given headers to the request, it doesn't override the value if the key already exists
Adds a parameter to the request, it doesn't override the value if the key already exists
Adds the given parameters to the request, it doesn't override the value if the key already exists
Sets the follow redirects option
Sets the maximum amount of redirects to follow
Sets the request method
Sets the given parameters to the request, it also overrides the value if the key already exists
Sets the protocol of the request
Sets the read timeout of the request
Sends the request
Turns this request information (protocol, host, port, path and params) into a url string