Class

requests

Session

Related Doc: package requests

Permalink

case class Session(headers: Map[String, String] = BaseSession.defaultHeaders, cookieValues: Map[String, String] = Map(), cookies: Map[String, HttpCookie] = ..., auth: RequestAuth = RequestAuth.Empty, proxy: (String, Int) = null, cert: Cert = null, sslContext: SSLContext = 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. 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

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

Instance Constructors

  1. new Session(headers: Map[String, String] = BaseSession.defaultHeaders, cookieValues: Map[String, String] = Map(), cookies: Map[String, HttpCookie] = ..., auth: RequestAuth = RequestAuth.Empty, proxy: (String, Int) = null, cert: Cert = null, sslContext: SSLContext = 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)

    Permalink

    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

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. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. val auth: RequestAuth

    Permalink

    HTTP authentication you want to use with this request; defaults to none

    HTTP authentication you want to use with this request; defaults to none

    Definition Classes
    SessionBaseSession
  6. val autoDecompress: Boolean

    Permalink
    Definition Classes
    SessionBaseSession
  7. val cert: Cert

    Permalink
    Definition Classes
    SessionBaseSession
  8. val check: Boolean

    Permalink
    Definition Classes
    SessionBaseSession
  9. val chunkedUpload: Boolean

    Permalink
    Definition Classes
    SessionBaseSession
  10. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @throws( ... )
  11. val compress: Compress

    Permalink
    Definition Classes
    SessionBaseSession
  12. val connectTimeout: Int

    Permalink

    How long to wait for a connection before timing out

    How long to wait for a connection before timing out

    Definition Classes
    SessionBaseSession
  13. val cookieValues: Map[String, String]

    Permalink
  14. val cookies: Map[String, HttpCookie]

    Permalink

    Custom cookies to send up with this request

    Custom cookies to send up with this request

    Definition Classes
    SessionBaseSession
  15. lazy val delete: Requester

    Permalink
    Definition Classes
    BaseSession
  16. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  17. lazy val get: Requester

    Permalink
    Definition Classes
    BaseSession
  18. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  19. lazy val head: Requester

    Permalink
    Definition Classes
    BaseSession
  20. val headers: Map[String, String]

    Permalink

    Custom headers to use, in addition to the defaults

    Custom headers to use, in addition to the defaults

    Definition Classes
    SessionBaseSession
  21. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  22. val maxRedirects: Int

    Permalink

    How many redirects to automatically resolve; defaults to 5.

    How many redirects to automatically resolve; defaults to 5. You can also set it to 0 to prevent Requests from resolving redirects for you

    Definition Classes
    SessionBaseSession
  23. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  26. lazy val options: Requester

    Permalink
    Definition Classes
    BaseSession
  27. lazy val patch: Requester

    Permalink
    Definition Classes
    BaseSession
  28. val persistCookies: Boolean

    Permalink
    Definition Classes
    SessionBaseSession
  29. lazy val post: Requester

    Permalink
    Definition Classes
    BaseSession
  30. val proxy: (String, Int)

    Permalink

    Host and port of a proxy you want to use

    Host and port of a proxy you want to use

    Definition Classes
    SessionBaseSession
  31. lazy val put: Requester

    Permalink
    Definition Classes
    BaseSession
  32. val readTimeout: Int

    Permalink

    How long to wait for data to be read before timing out

    How long to wait for data to be read before timing out

    Definition Classes
    SessionBaseSession
  33. val sslContext: SSLContext

    Permalink
    Definition Classes
    SessionBaseSession
  34. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  35. val verifySslCerts: Boolean

    Permalink

    Set this to false to ignore problems with SSL certificates

    Set this to false to ignore problems with SSL certificates

    Definition Classes
    SessionBaseSession
  36. final def wait(arg0: Long, arg1: Int): Unit

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  38. 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 BaseSession

Inherited from AnyRef

Inherited from Any

Ungrouped