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
- Alphabetic
- By Inheritance
- Session
- Serializable
- Serializable
- Product
- Equals
- BaseSession
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
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)
- 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
-
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
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
val
auth: RequestAuth
- Definition Classes
- Session → BaseSession
-
val
autoDecompress: Boolean
- Definition Classes
- Session → BaseSession
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate() @throws( ... )
-
val
compress: Compress
- Definition Classes
- Session → BaseSession
-
val
connectTimeout: Int
- Definition Classes
- Session → BaseSession
- val cookieValues: Map[String, String]
-
val
cookies: Map[String, HttpCookie]
- Definition Classes
- Session → BaseSession
-
lazy val
delete: Requester
- Definition Classes
- BaseSession
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
lazy val
get: Requester
- Definition Classes
- BaseSession
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
lazy val
head: Requester
- Definition Classes
- BaseSession
-
val
headers: Map[String, String]
- Definition Classes
- Session → BaseSession
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
val
maxRedirects: Int
- Definition Classes
- Session → BaseSession
-
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()
-
lazy val
options: Requester
- Definition Classes
- BaseSession
-
lazy val
patch: Requester
- Definition Classes
- BaseSession
-
val
persistCookies: Boolean
- Definition Classes
- Session → BaseSession
-
lazy val
post: Requester
- Definition Classes
- BaseSession
-
val
proxy: (String, Int)
- Definition Classes
- Session → BaseSession
-
lazy val
put: Requester
- Definition Classes
- BaseSession
-
val
readTimeout: Int
- Definition Classes
- Session → BaseSession
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
val
verifySslCerts: Boolean
- Definition Classes
- Session → BaseSession
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )