case class Requester(verb: String, sess: BaseSession) extends Product with Serializable
- Alphabetic
- By Inheritance
- Requester
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new Requester(verb: String, sess: BaseSession)
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##(): Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def apply(r: Request, data: RequestBlob, chunkedUpload: Boolean): Response
Overload of Requester.apply that takes a Request object as configuration
- def apply(url: String, auth: RequestAuth = sess.auth, params: Iterable[(String, String)] = Nil, headers: Iterable[(String, String)] = Nil, data: RequestBlob = RequestBlob.EmptyRequestBlob, readTimeout: Int = sess.readTimeout, connectTimeout: Int = sess.connectTimeout, proxy: (String, Int) = sess.proxy, cert: Cert = sess.cert, sslContext: SSLContext = sess.sslContext, cookies: Map[String, HttpCookie] = Map(), cookieValues: Map[String, String] = Map(), maxRedirects: Int = sess.maxRedirects, verifySslCerts: Boolean = sess.verifySslCerts, autoDecompress: Boolean = sess.autoDecompress, compress: Compress = sess.compress, keepAlive: Boolean = true, check: Boolean = sess.check, chunkedUpload: Boolean = sess.chunkedUpload): Response
Makes a single HTTP request, and returns a Response object.
Makes a single HTTP request, and returns a Response object. Requires all uploaded request
data
to be provided up-front, and aggregates all downloaded responsedata
before returning it in the response. If you need streaming access to the upload and download, use the Requester.stream function instead.- url
The URL to which you want to make this HTTP request
- auth
HTTP authentication you want to use with this request; defaults to none
- params
URL params to pass to this request, for GETs and DELETEs
- headers
Custom headers to use, in addition to the defaults
- 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.
- readTimeout
How long to wait for data to be read before timing out
- connectTimeout
How long to wait for a connection before timing out
- proxy
Host and port of a proxy you want to use
- cert
Client certificate configuration
- sslContext
Client sslContext configuration
- cookies
Custom cookies to send up with this request
- 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
- verifySslCerts
Set this to false to ignore problems with SSL certificates
- check
Throw an exception on a 4xx or 5xx response code. Defaults to
true
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- val sess: BaseSession
- def stream(r: Request, data: RequestBlob, chunkedUpload: Boolean, onHeadersReceived: (StreamHeaders) => Unit): Writable
Overload of Requester.stream that takes a Request object as configuration
- def stream(url: String, auth: RequestAuth = sess.auth, params: Iterable[(String, String)] = Nil, blobHeaders: Iterable[(String, String)] = Nil, headers: Iterable[(String, String)] = Nil, data: RequestBlob = RequestBlob.EmptyRequestBlob, readTimeout: Int = sess.readTimeout, connectTimeout: Int = sess.connectTimeout, proxy: (String, Int) = sess.proxy, cert: Cert = sess.cert, sslContext: SSLContext = sess.sslContext, cookies: Map[String, HttpCookie] = Map(), cookieValues: Map[String, String] = Map(), maxRedirects: Int = sess.maxRedirects, verifySslCerts: Boolean = sess.verifySslCerts, autoDecompress: Boolean = sess.autoDecompress, compress: Compress = sess.compress, keepAlive: Boolean = true, check: Boolean = true, chunkedUpload: Boolean = false, redirectedFrom: Option[Response] = None, onHeadersReceived: (StreamHeaders) => Unit = null): Readable
Performs a streaming HTTP request.
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.- 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
false
can be used to- returns
a
Writable
that can be used to write the output data to any destination
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- val verb: String
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])