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, persistCookies: Boolean = true, maxRedirects: Int = 5, readTimeout: Int = 10 * 1000, connectTimeout: Int = 10 * 1000, verifySslCerts: Boolean = true, autoDecompress: Boolean = true, compress: Compress = Compress.None) 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, persistCookies: Boolean = true, maxRedirects: Int = 5, readTimeout: Int = 10 * 1000, connectTimeout: Int = 10 * 1000, verifySslCerts: Boolean = true, autoDecompress: Boolean = true, compress: Compress = Compress.None)

    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. def clone(): AnyRef

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

    Permalink
    Definition Classes
    SessionBaseSession
  9. 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
  10. val cookieValues: Map[String, String]

    Permalink
  11. 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
  12. lazy val delete: Requester

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

    Permalink
    Definition Classes
    AnyRef
  14. lazy val get: Requester

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

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

    Permalink
    Definition Classes
    BaseSession
  17. 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
  18. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  19. 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
  20. final def ne(arg0: AnyRef): Boolean

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

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

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

    Permalink
    Definition Classes
    BaseSession
  24. lazy val patch: Requester

    Permalink
    Definition Classes
    BaseSession
  25. val persistCookies: Boolean

    Permalink
    Definition Classes
    SessionBaseSession
  26. lazy val post: Requester

    Permalink
    Definition Classes
    BaseSession
  27. 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
  28. lazy val put: Requester

    Permalink
    Definition Classes
    BaseSession
  29. 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
  30. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  31. 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
  32. final def wait(arg0: Long, arg1: Int): Unit

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

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