Class/Object

io.youi.client

JVMHttpClient

Related Docs: object JVMHttpClient | package client

Permalink

case class JVMHttpClient(config: HttpClientConfig = HttpClient.config) extends HttpClient with Product with Serializable

Asynchronous HttpClient for simple request response support.

Adds support for simple restful request/response JSON support.

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

Instance Constructors

  1. new JVMHttpClient(config: HttpClientConfig = HttpClient.config)

    Permalink

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. def call[Response](url: URL, method: Method = Method.Get, headers: Headers = Headers.empty, errorHandler: ErrorHandler[Response] = defaultErrorHandler[Response], config: HttpClientConfig = config)(implicit decoder: Decoder[Response]): Future[Response]

    Permalink

    Builds on the send method by supporting basic restful calls that calls a URL and returns a case class as the response.

    Builds on the send method by supporting basic restful calls that calls a URL and returns a case class as the response.

    Response

    the response type

    url

    the URL of the endpoint

    headers

    the headers if any to provide

    errorHandler

    error handling support if the response status is not Success

    decoder

    circe decoding of the Response

    returns

    Future[Response]

    Definition Classes
    HttpClient
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. val config: HttpClientConfig

    Permalink
    Definition Classes
    JVMHttpClientHttpClient
  8. def content2Bytes(content: Content): Array[Byte]

    Permalink
    Attributes
    protected
  9. def content2String(content: Content): String

    Permalink
    Attributes
    protected
    Definition Classes
    JVMHttpClientHttpClient
  10. def contentToBytes(contentType: ContentType, contentLength: Option[Long]): Boolean

    Permalink
    Attributes
    protected
  11. def contentToString(contentType: ContentType, contentLength: Option[Long]): Boolean

    Permalink
    Attributes
    protected
  12. def defaultErrorHandler[Response]: ErrorHandler[Response]

    Permalink

    Default error handler for restful bad response statuses.

    Default error handler for restful bad response statuses.

    Response

    the type of response

    returns

    throws a RuntimeException when an error occurs

    Attributes
    protected
    Definition Classes
    HttpClient
  13. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  14. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  16. def implementation(request: HttpRequest): Future[HttpResponse]

    Permalink
    Attributes
    protected
    Definition Classes
    JVMHttpClientHttpClient
  17. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  18. def logStats(): Unit

    Permalink
  19. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  22. lazy val printer: Printer

    Permalink
    Attributes
    protected
    Definition Classes
    HttpClient
  23. def restful[Request, Response](url: URL, request: Request, headers: Headers = Headers.empty, errorHandler: ErrorHandler[Response] = defaultErrorHandler[Response], method: Method = Method.Post, processor: (Json) ⇒ Json = (json: Json) => json, config: HttpClientConfig = config)(implicit encoder: Encoder[Request], decoder: Decoder[Response]): Future[Response]

    Permalink

    Builds on the send method by supporting basic restful calls that take a case class as the request and returns a case class as the response.

    Builds on the send method by supporting basic restful calls that take a case class as the request and returns a case class as the response.

    Request

    the request type

    Response

    the response type

    url

    the URL of the endpoint

    request

    the request instance

    headers

    the headers if any to provide

    errorHandler

    error handling support if the response status is not Success

    encoder

    circe encoding of the Request

    decoder

    circe decoding of the Response

    returns

    Future[Response]

    Definition Classes
    HttpClient
  24. final def send(request: HttpRequest, config: HttpClientConfig = config): Future[HttpResponse]

    Permalink

    Sends an HttpRequest and receives an asynchronous HttpResponse future.

    Sends an HttpRequest and receives an asynchronous HttpResponse future.

    request

    the request to send

    config

    the configuration (defaults to the client's config)

    returns

    Future[HttpResponse]

    Definition Classes
    HttpClient
  25. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  26. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from HttpClient

Inherited from AnyRef

Inherited from Any

Ungrouped