requests
package requests
- Alphabetic
- By Inheritance
- requests
- BaseSession
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
- trait BaseSession extends AnyRef
- trait Compress extends AnyRef
Mechanisms for compressing the upload stream; supports Gzip and Deflate by default
- class InvalidCertException extends Exception
- case class MultiItem(name: String, data: RequestBlob, filename: String = null) extends Product with Serializable
- case class MultiPart(items: MultiItem*) extends MultipartFormRequestBlob with Product with Serializable
- case class Request(url: String, auth: RequestAuth = RequestAuth.Empty, params: Iterable[(String, String)] = Nil, headers: Iterable[(String, String)] = Nil, readTimeout: Int = 0, connectTimeout: Int = 0, proxy: (String, Int) = null, cookies: Map[String, HttpCookie] = Map(), cookieValues: Map[String, String] = Map(), maxRedirects: Int = 5, verifySslCerts: Boolean = true, autoDecompress: Boolean = true, compress: Compress = Compress.None, keepAlive: Boolean = true, check: Boolean = true) extends Product with Serializable
The equivalent of configuring a Requester.apply or Requester.stream call, but without invoking it.
The equivalent of configuring a Requester.apply or Requester.stream call, but without invoking it. Useful if you want to further customize it and make the call later via the overloads of
apply
/stream
that take a Request. - trait RequestAuth extends AnyRef
Different ways you can authorize a HTTP request; by default, HTTP Basic auth and Proxy auth are supported
- trait RequestBlob extends AnyRef
Represents the different things you can upload in the body of a HTTP request.
Represents the different things you can upload in the body of a HTTP request. By default allows form-encoded key-value pairs, arrays of bytes, strings, files, and inputstreams. These types can be passed directly to the
data
parameter of Requester.apply and will be wrapped automatically by the implicit constructors. - class RequestFailedException extends Exception
- case class Requester(verb: String, sess: BaseSession) extends Product with Serializable
- case class Response(url: String, statusCode: Int, statusMessage: String, headers: Map[String, Seq[String]], data: Bytes, history: Option[Response]) extends ByteData with Product with Serializable
Represents a HTTP response
Represents a HTTP response
- url
the URL that the original request was made to
- statusCode
the status code of the response
- statusMessage
the status message of the response
- headers
the raw headers the server sent back with the response
- data
the response body; may contain HTML, JSON, or binary or textual data
- history
the response of any redirects that were performed before arriving at the current response
- class ResponseBlob extends AnyRef
Wraps the array of bytes returned in the body of a HTTP response
- case class Session(headers: Map[String, String] = BaseSession.defaultHeaders, cookieValues: Map[String, String] = Map(), cookies: Map[String, HttpCookie] = mutable.LinkedHashMap.empty[String, HttpCookie], auth: RequestAuth = RequestAuth.Empty, proxy: (String, Int) = null, persistCookies: Boolean = true, maxRedirects: Int = 5, readTimeout: Int = 10 * 1000, connectTimeout: Int = 10 * 1000, verifySslCerts: Boolean = true, autoDecompress: Boolean = true, compress: Compress = Compress.None, chunkedUpload: Boolean = false, check: Boolean = true) extends BaseSession with Product with Serializable
A long-lived session; this can be used to automatically persist cookies from one request to the next, or to set default configuration that will be shared between requests.
A long-lived session; this can be used to automatically persist cookies from one request to the next, or to set default configuration that will be shared between requests. These configuration flags can all be over-ridden by the parameters on Requester.apply or Requester.stream
- headers
Custom headers to use, in addition to the defaults
- cookies
Custom cookies to send up with this request
- auth
HTTP authentication you want to use with this request; defaults to none
- proxy
Host and port of a proxy you want to use
- 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
- readTimeout
How long to wait for data to be read before timing out
- connectTimeout
How long to wait for a connection before timing out
- verifySslCerts
Set this to false to ignore problems with SSL certificates
- case class StreamHeaders(url: String, statusCode: Int, statusMessage: String, headers: Map[String, Seq[String]], history: Option[Response]) extends Product with Serializable
- class TimeoutException extends Exception
- class UnknownHostException extends Exception
Abstract Value Members
- abstract def auth: RequestAuth
- Definition Classes
- BaseSession
- abstract def autoDecompress: Boolean
- Definition Classes
- BaseSession
- abstract def check: Boolean
- Definition Classes
- BaseSession
- abstract def chunkedUpload: Boolean
- Definition Classes
- BaseSession
- abstract def compress: Compress
- Definition Classes
- BaseSession
- abstract def connectTimeout: Int
- Definition Classes
- BaseSession
- abstract def cookies: Map[String, HttpCookie]
- Definition Classes
- BaseSession
- abstract def headers: Map[String, String]
- Definition Classes
- BaseSession
- abstract def maxRedirects: Int
- Definition Classes
- BaseSession
- abstract def persistCookies: Boolean
- Definition Classes
- BaseSession
- abstract def proxy: (String, Int)
- Definition Classes
- BaseSession
- abstract def readTimeout: Int
- Definition Classes
- BaseSession
- abstract def verifySslCerts: Boolean
- Definition Classes
- BaseSession
Concrete Value Members
- lazy val delete: Requester
- Definition Classes
- BaseSession
- lazy val get: Requester
- Definition Classes
- BaseSession
- lazy val head: Requester
- Definition Classes
- BaseSession
- lazy val options: Requester
- Definition Classes
- BaseSession
- lazy val patch: Requester
- Definition Classes
- BaseSession
- lazy val post: Requester
- Definition Classes
- BaseSession
- lazy val put: Requester
- Definition Classes
- BaseSession
- object BaseSession
- object Compress
- object RequestAuth
- object RequestBlob
- object Requester extends Serializable
- object Util