uk.co.bigbeeconsultants.http

Http

abstract class Http extends HttpExecutor

Describes an API for making HTTP requests.

Linear Supertypes
HttpExecutor, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Http
  2. HttpExecutor
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Http(commonConfig: Config = ...)

Abstract Value Members

  1. abstract def execute(request: Request, responseBuilder: ResponseBuilder, config: Config): Unit

    Makes an arbitrary request using a response builder.

    Makes an arbitrary request using a response builder. After this call, the response builder will provide the response.

    request

    the request

    responseBuilder

    the response factory, e.g. new BufferedResponseBuilder

    config

    the particular configuration being used for this request; defaults to the commonConfiguration supplied to this instance of HttpClient

    Definition Classes
    HttpExecutor
    Annotations
    @throws( classOf[IOException] ) @throws( classOf[IllegalStateException] )
    Exceptions thrown
    IOException

    (or ConnectException subclass) if an IO exception occurred

    IllegalStateException

    if the maximum redirects threshold was exceeded

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

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  8. val commonConfig: Config

  9. def delete(url: URL, requestHeaders: Headers, jar: CookieJar): Response

    Make a DELETE request with cookies.

    Make a DELETE request with cookies.

    Annotations
    @throws( classOf[IOException] )
  10. def delete(url: URL, requestHeaders: Headers = Nil): Response

    Make a DELETE request.

    Make a DELETE request. No cookies are used and none are returned.

    Annotations
    @throws( classOf[IOException] )
  11. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  13. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  14. def get(url: URL, requestHeaders: Headers, jar: CookieJar): Response

    Make a GET request with cookies.

    Make a GET request with cookies.

    Annotations
    @throws( classOf[IOException] )
  15. def get(url: URL, requestHeaders: Headers = Nil): Response

    Make a GET request.

    Make a GET request. No cookies are used and none are returned.

    Annotations
    @throws( classOf[IOException] )
  16. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  17. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  18. def head(url: URL, requestHeaders: Headers, jar: CookieJar): Response

    Make a HEAD request with cookies.

    Make a HEAD request with cookies.

    Annotations
    @throws( classOf[IOException] )
  19. def head(url: URL, requestHeaders: Headers = Nil): Response

    Make a HEAD request.

    Make a HEAD request. No cookies are used and none are returned.

    Annotations
    @throws( classOf[IOException] )
  20. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  21. def makeRequest(request: Request, config: Config = commonConfig): Response

    Makes an arbitrary request and returns the response, which contains the entire response body in a buffer.

    Makes an arbitrary request and returns the response, which contains the entire response body in a buffer. All the convenience methods (head, get, put, post, trace, options) use this buffered method.

    It is the 'normal' way to make HTTP requests. Bit it may be inappropriate when the response body is too large to be buffered in memory, or if it is desirable to start processing the body whilst it is still being read in, in which case use 'makeUnbufferedRequest' instead.

    request

    the request

    config

    the particular configuration being used for this request; defaults to the commonConfiguration supplied to this instance of HttpClient

    returns

    the response (for all outcomes including 4xx and 5xx status codes) if no exception occurred

    Annotations
    @throws( classOf[IOException] )
    Exceptions thrown
    IOException

    (or ConnectException subclass) if an IO exception occurred

  22. def makeUnbufferedRequest(request: Request, config: Config = commonConfig): Response

    Makes an arbitrary request and returns a the response.

    Makes an arbitrary request and returns a the response. For successful 200-OK responses, this will be an *unbuffered* response with direct access to the source input stream. This allows bespoke usage of this stream. It is the caller's responsibility to ensure that the stream is always closed, so preventing leakage of resources. This is made easier because the stream is of a kind that will automatically close as soon as all the data has been read.

    For all responses other than 200-OK, a buffered response is returned, as if makeRequest had been used instead. This ensures that the input stream is automatically closed for all error, redirection and no-content responses.

    request

    the request

    config

    the particular configuration being used for this request; defaults to the commonConfiguration supplied to this instance of HttpClient

    returns

    the response (for all outcomes including 4xx and 5xx status codes) if no exception occurred

    Annotations
    @throws( classOf[IOException] )
    Exceptions thrown
    IOException

    (or ConnectException subclass) if an IO exception occurred

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

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

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

    Definition Classes
    AnyRef
  26. def options(url: URL, body: Option[RequestBody], requestHeaders: Headers, jar: CookieJar): Response

    Make an OPTIONS request with cookies.

    Make an OPTIONS request with cookies.

    Annotations
    @throws( classOf[IOException] )
  27. def options(url: URL, body: Option[RequestBody], requestHeaders: Headers = Nil): Response

    Make an OPTIONS request.

    Make an OPTIONS request. No cookies are used and none are returned.

    Annotations
    @throws( classOf[IOException] )
  28. def post(url: URL, body: Option[RequestBody], requestHeaders: Headers, jar: CookieJar): Response

    Make a POST request with cookies.

    Make a POST request with cookies.

    Annotations
    @throws( classOf[IOException] )
  29. def post(url: URL, body: Option[RequestBody], requestHeaders: Headers = Nil): Response

    Make a POST request.

    Make a POST request. No cookies are used and none are returned.

    Annotations
    @throws( classOf[IOException] )
  30. def put(url: URL, body: RequestBody, requestHeaders: Headers, jar: CookieJar): Response

    Make a PUT request with cookies.

    Make a PUT request with cookies.

    Annotations
    @throws( classOf[IOException] )
  31. def put(url: URL, body: RequestBody, requestHeaders: Headers = Nil): Response

    Make a PUT request.

    Make a PUT request. No cookies are used and none are returned.

    Annotations
    @throws( classOf[IOException] )
  32. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  33. def toString(): String

    Definition Classes
    AnyRef → Any
  34. def trace(url: URL, requestHeaders: Headers, jar: CookieJar): Response

    Make a TRACE request with cookies.

    Make a TRACE request with cookies.

    Annotations
    @throws( classOf[IOException] )
  35. def trace(url: URL, requestHeaders: Headers = Nil): Response

    Make a TRACE request.

    Make a TRACE request. No cookies are used and none are returned.

    Annotations
    @throws( classOf[IOException] )
  36. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from HttpExecutor

Inherited from AnyRef

Inherited from Any

Ungrouped