Class/Object

requests

Requester

Related Docs: object Requester | package requests

Permalink

case class Requester(verb: String, sess: BaseSession) extends Product with Serializable

Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Requester
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Requester(verb: String, sess: BaseSession)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def apply(r: Request, data: RequestBlob): Response

    Permalink

    Overload of Requester.apply that takes a Request object as configuration

  5. 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, 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): Response

    Permalink

    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 response data 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

    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

  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @throws( ... )
  8. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  9. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  10. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  11. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  12. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  13. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  14. val sess: BaseSession

    Permalink
  15. def stream(r: Request, totalSize: Long, inMemory: Boolean)(onUpload: (OutputStream) ⇒ Unit, onHeadersReceived: (StreamHeaders) ⇒ Unit, onDownload: (InputStream) ⇒ Unit): Unit

    Permalink

    Overload of Requester.stream that takes a Request object as configuration

  16. def stream(url: String, auth: RequestAuth = sess.auth, params: Iterable[(String, String)] = Nil, blobHeaders: Iterable[(String, String)] = Nil, headers: Iterable[(String, String)] = Nil, readTimeout: Int = sess.readTimeout, connectTimeout: Int = sess.connectTimeout, proxy: (String, Int) = sess.proxy, 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, totalSize: Long = 1, inMemory: Boolean = true, redirectedFrom: Option[Response] = None)(onUpload: (OutputStream) ⇒ Unit = null, onHeadersReceived: (StreamHeaders) ⇒ Unit = null, onDownload: (InputStream) ⇒ Unit = null): Unit

    Permalink

    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.

    onUpload

    the first callback to be called, this provides direct access to the java.io.OutputStream the caller can use to upload data as part of the request from whatever data source(s) are available.

    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

    onDownload

    the last callback to be called, this provides direct access to the java.io.InputStream the caller can use to download the response data.

  17. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  18. val verb: String

    Permalink
  19. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped