uk.co.bigbeeconsultants.http

Config

case class Config(connectTimeout: Int = 2000, readTimeout: Int = 5000, followRedirects: Boolean = true, maxRedirects: Int = 20, useCaches: Boolean = true, keepAlive: Boolean = true, userAgentString: Option[String] = scala.None, proxy: Option[Proxy] = ..., credentials: CredentialSuite = auth.CredentialSuite.Empty, hostnameVerifier: Option[HostnameVerifier] = scala.None, sslSocketFactory: Option[SSLSocketFactory] = scala.None, commonRequestHeaders: Headers = Config.defaultRequestHeaders, preRequests: List[PreRequest] = Config.standardSetup) extends Product with Serializable

Specifies configuration options that will be used across many requests or for a particular request.

connectTimeout

sets the connection timeout in milliseconds (2000)

readTimeout

sets the read timeout in milliseconds (5000)

followRedirects

enabled automatic following of redirects (true)

maxRedirects

sets the maximum times a cyclic redirect will be followed (20)

useCaches

enables the use of content caches (true)

keepAlive

when true, persistent keep-alive HTTP1.1 connections are used (true)

userAgentString

sets the string that is used to identify this client to the server

proxy

supplies the proxy configuration (NO_PROXY). See http://docs.oracle.com/javase/6/docs/api/java/net/Proxy.html

credentials

provides a credentials source (empty) -- experimental

hostnameVerifier

an optional SSL hostname verifier to be used on all requests. This is similar to setting the global state via HttpsURLConnection.setDefaultHostnameVerifier, except that, this way, it is possible to configure multiple clients each with their own hostname verifier.

sslSocketFactory

an optional SSL socket factory to be used on all requests. This is similar to setting the global state via HttpsURLConnection.setDefaultSSLSocketFactory, except that, this way, it is possible to configure multiple clients each with their own socket factory.

commonRequestHeaders

headers sent on every request, in addition to those cited in each particular request

preRequests

provides the pre-request handlers to configure headers etc on every request using Config.standardSetup, i.e. (List(uk.co.bigbeeconsultants.http.request.AutomaticHostHeader, uk.co.bigbeeconsultants.http.request.DefaultRequestHeaders, uk.co.bigbeeconsultants.http.request.ConnectionControl, uk.co.bigbeeconsultants.http.request.UserAgentString, uk.co.bigbeeconsultants.http.request.SSLSocketFactoryInjecter, uk.co.bigbeeconsultants.http.request.HostnameVerifierInjecter))

Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Config
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Config(connectTimeout: Int = 2000, readTimeout: Int = 5000, followRedirects: Boolean = true, maxRedirects: Int = 20, useCaches: Boolean = true, keepAlive: Boolean = true, userAgentString: Option[String] = scala.None, proxy: Option[Proxy] = ..., credentials: CredentialSuite = auth.CredentialSuite.Empty, hostnameVerifier: Option[HostnameVerifier] = scala.None, sslSocketFactory: Option[SSLSocketFactory] = scala.None, commonRequestHeaders: Headers = Config.defaultRequestHeaders, preRequests: List[PreRequest] = Config.standardSetup)

    connectTimeout

    sets the connection timeout in milliseconds (2000)

    readTimeout

    sets the read timeout in milliseconds (5000)

    followRedirects

    enabled automatic following of redirects (true)

    maxRedirects

    sets the maximum times a cyclic redirect will be followed (20)

    useCaches

    enables the use of content caches (true)

    keepAlive

    when true, persistent keep-alive HTTP1.1 connections are used (true)

    userAgentString

    sets the string that is used to identify this client to the server

    proxy

    supplies the proxy configuration (NO_PROXY). See http://docs.oracle.com/javase/6/docs/api/java/net/Proxy.html

    credentials

    provides a credentials source (empty) -- experimental

    hostnameVerifier

    an optional SSL hostname verifier to be used on all requests. This is similar to setting the global state via HttpsURLConnection.setDefaultHostnameVerifier, except that, this way, it is possible to configure multiple clients each with their own hostname verifier.

    sslSocketFactory

    an optional SSL socket factory to be used on all requests. This is similar to setting the global state via HttpsURLConnection.setDefaultSSLSocketFactory, except that, this way, it is possible to configure multiple clients each with their own socket factory.

    commonRequestHeaders

    headers sent on every request, in addition to those cited in each particular request

    preRequests

    provides the pre-request handlers to configure headers etc on every request using Config.standardSetup, i.e. (List(uk.co.bigbeeconsultants.http.request.AutomaticHostHeader, uk.co.bigbeeconsultants.http.request.DefaultRequestHeaders, uk.co.bigbeeconsultants.http.request.ConnectionControl, uk.co.bigbeeconsultants.http.request.UserAgentString, uk.co.bigbeeconsultants.http.request.SSLSocketFactoryInjecter, uk.co.bigbeeconsultants.http.request.HostnameVerifierInjecter))

Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. def allowInsecureSSL: Config

    Constructs a new copy of this that suppresses the normal SSL/TLS security checks.

    Constructs a new copy of this that suppresses the normal SSL/TLS security checks. This applies both allowInsecureSSLHostnames and allowInsecureSSLCertificates.

    This will allow insecure https connections and must be used with care. Using this is similar to "curl -k" and is useful for self-signed certificates, typically during development only. Be very careful not to use it where security matters.

    Note that there is an alternative: you can capture the self-signed certificate with your web browser and put it in your keystore. Both techniques are described here: http://stackoverflow.com/questions/2893819/telling-java-to-accept-self-signed-ssl-certificate

  7. def allowInsecureSSLCertificates: Config

    Constructs a new copy of this that suppresses the normal SSL/TLS certificate checks.

    Constructs a new copy of this that suppresses the normal SSL/TLS certificate checks. This will allow insecure https connections and must be used with care.

  8. def allowInsecureSSLHostnames: Config

    Constructs a new copy of this that suppresses the normal SSL/TLS security checks on hostnames.

    Constructs a new copy of this that suppresses the normal SSL/TLS security checks on hostnames. This will allow insecure https connections and must be used with care.

  9. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  10. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  11. val commonRequestHeaders: Headers

    headers sent on every request, in addition to those cited in each particular request

  12. val connectTimeout: Int

    sets the connection timeout in milliseconds (2000)

  13. val credentials: CredentialSuite

    provides a credentials source (empty) -- experimental

  14. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  15. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  16. val followRedirects: Boolean

    enabled automatic following of redirects (true)

  17. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  18. val hostnameVerifier: Option[HostnameVerifier]

    an optional SSL hostname verifier to be used on all requests.

    an optional SSL hostname verifier to be used on all requests. This is similar to setting the global state via HttpsURLConnection.setDefaultHostnameVerifier, except that, this way, it is possible to configure multiple clients each with their own hostname verifier.

  19. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  20. val keepAlive: Boolean

    when true, persistent keep-alive HTTP1.

    when true, persistent keep-alive HTTP1.1 connections are used (true)

  21. val maxRedirects: Int

    sets the maximum times a cyclic redirect will be followed (20)

  22. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  23. final def notify(): Unit

    Definition Classes
    AnyRef
  24. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  25. val preRequests: List[PreRequest]

    provides the pre-request handlers to configure headers etc on every request using Config.

  26. val proxy: Option[Proxy]

    supplies the proxy configuration (NO_PROXY).

    supplies the proxy configuration (NO_PROXY). See http://docs.oracle.com/javase/6/docs/api/java/net/Proxy.html

  27. val readTimeout: Int

    sets the read timeout in milliseconds (5000)

  28. val sslSocketFactory: Option[SSLSocketFactory]

    an optional SSL socket factory to be used on all requests.

    an optional SSL socket factory to be used on all requests. This is similar to setting the global state via HttpsURLConnection.setDefaultSSLSocketFactory, except that, this way, it is possible to configure multiple clients each with their own socket factory.

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

    Definition Classes
    AnyRef
  30. val useCaches: Boolean

    enables the use of content caches (true)

  31. val userAgentString: Option[String]

    sets the string that is used to identify this client to the server

  32. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped