- Companion:
- object
Value members
Concrete methods
Makes a single HTTP request, and returns a Response object. Requires
all uploaded request data to be provided up-front, and aggregates all
downloaded response data before returning it in the response. If you
need streaming access to the upload and download, use the Requester.stream
function instead.
Makes a single HTTP request, and returns a Response object. Requires
all uploaded request data to be provided up-front, and aggregates all
downloaded response data before returning it in the response. If you
need streaming access to the upload and download, use the Requester.stream
function instead.
- Value parameters:
- auth
HTTP authentication you want to use with this request; defaults to none
- cert
Client certificate configuration
- check
Throw an exception on a 4xx or 5xx response code. Defaults to
true- connectTimeout
How long to wait for a connection before timing out
- cookies
Custom cookies to send up with this request
- data
Body data to pass to this request, for POSTs and PUTs. Can be a Map[String, String] of form data, bulk data as a String or Array[Byte], or MultiPart form data.
- headers
Custom headers to use, in addition to the defaults
- maxRedirects
How many redirects to automatically resolve; defaults to 5. You can also set it to 0 to prevent Requests from resolving redirects for you
- params
URL params to pass to this request, for
GETs andDELETEs- proxy
Host and port of a proxy you want to use
- readTimeout
How long to wait for data to be read before timing out
- sslContext
Client sslContext configuration
- url
The URL to which you want to make this HTTP request
- verifySslCerts
Set this to false to ignore problems with SSL certificates
Overload of Requester.apply that takes a Request object as configuration
Overload of Requester.apply that takes a Request object as configuration
Performs a streaming HTTP request. Most of the parameters are the same as
apply, except that the data parameter is missing, and no Response
object is returned. Instead, the caller gets access via three callbacks
(described below). This provides a lower-level API than Requester.apply,
allowing the caller fine-grained access to the upload/download streams
so they can direct them where-ever necessary without first aggregating all
the data into memory.
Performs a streaming HTTP request. Most of the parameters are the same as
apply, except that the data parameter is missing, and no Response
object is returned. Instead, the caller gets access via three callbacks
(described below). This provides a lower-level API than Requester.apply,
allowing the caller fine-grained access to the upload/download streams
so they can direct them where-ever necessary without first aggregating all
the data into memory.
- Value parameters:
- onHeadersReceived
the second callback to be called, this provides access to the response's status code, status message, headers, and any previous re-direct responses. Returns a boolean, where
falsecan be used to
- Returns:
a
Writablethat can be used to write the output data to any destination
Overload of Requester.stream that takes a Request object as configuration
Overload of Requester.stream that takes a Request object as configuration