Packages

final case class Client(open: Service[Request, DisposableResponse], shutdown: Task[Unit]) extends Product with Serializable

A Client submits Requests to a server and processes the Response.

open

a service to asynchronously return a DisposableResponse from a Request. This is a low-level operation intended for client implementations and middleware.

shutdown

a Task to shut down this Shutdown this client, closing any open connections and freeing resources

Source
Client.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Client
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Client(open: Service[Request, DisposableResponse], shutdown: Task[Unit])

    open

    a service to asynchronously return a DisposableResponse from a Request. This is a low-level operation intended for client implementations and middleware.

    shutdown

    a Task to shut down this Shutdown this client, closing any open connections and freeing resources

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String
    Implicit
    This member is added by an implicit conversion from Client to any2stringadd[Client] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (Client, B)
    Implicit
    This member is added by an implicit conversion from Client to ArrowAssoc[Client] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  8. def ensuring(cond: (Client) ⇒ Boolean, msg: ⇒ Any): Client
    Implicit
    This member is added by an implicit conversion from Client to Ensuring[Client] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  9. def ensuring(cond: (Client) ⇒ Boolean): Client
    Implicit
    This member is added by an implicit conversion from Client to Ensuring[Client] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  10. def ensuring(cond: Boolean, msg: ⇒ Any): Client
    Implicit
    This member is added by an implicit conversion from Client to Ensuring[Client] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  11. def ensuring(cond: Boolean): Client
    Implicit
    This member is added by an implicit conversion from Client to Ensuring[Client] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  12. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. def expect[A](s: String)(implicit d: EntityDecoder[A]): Task[A]

    Submits a GET request to the URI specified by the String and decodes the response on success.

    Submits a GET request to the URI specified by the String and decodes the response on success. On failure, the status code is returned. The underlying HTTP connection is closed at the completion of the decoding.

  14. def expect[A](uri: Uri)(implicit d: EntityDecoder[A]): Task[A]

    Submits a GET request to the specified URI and decodes the response on success.

    Submits a GET request to the specified URI and decodes the response on success. On failure, the status code is returned. The underlying HTTP connection is closed at the completion of the decoding.

  15. def expect[A](req: Task[Request])(implicit d: EntityDecoder[A]): Task[A]
  16. def expect[A](req: Request)(implicit d: EntityDecoder[A]): Task[A]

    Submits a request and decodes the response on success.

    Submits a request and decodes the response on success. On failure, the status code is returned. The underlying HTTP connection is closed at the completion of the decoding.

  17. def fetch[A](req: Task[Request])(f: (Response) ⇒ Task[A]): Task[A]

    Submits a request, and provides a callback to process the response.

    Submits a request, and provides a callback to process the response.

    req

    A Task of the request to submit

    f

    A callback for the response to req. The underlying HTTP connection is disposed when the returned task completes. Attempts to read the response body afterward will result in an error.

    returns

    The result of applying f to the response to req

  18. def fetch[A](req: Request)(f: (Response) ⇒ Task[A]): Task[A]

    Submits a request, and provides a callback to process the response.

    Submits a request, and provides a callback to process the response.

    req

    The request to submit

    f

    A callback for the response to req. The underlying HTTP connection is disposed when the returned task completes. Attempts to read the response body afterward will result in an error.

    returns

    The result of applying f to the response to req

  19. def fetchAs[A](req: Task[Request])(implicit d: EntityDecoder[A]): Task[A]

    Submits a request and decodes the response, regardless of the status code.

    Submits a request and decodes the response, regardless of the status code. The underlying HTTP connection is closed at the completion of the decoding.

  20. def fetchAs[A](req: Request)(implicit d: EntityDecoder[A]): Task[A]

    Submits a request and decodes the response, regardless of the status code.

    Submits a request and decodes the response, regardless of the status code. The underlying HTTP connection is closed at the completion of the decoding.

  21. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  22. def formatted(fmtstr: String): String
    Implicit
    This member is added by an implicit conversion from Client to StringFormat[Client] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  23. def get[A](s: String)(f: (Response) ⇒ Task[A]): Task[A]

    Submits a request and decodes the response on success.

    Submits a request and decodes the response on success. On failure, the status code is returned. The underlying HTTP connection is closed at the completion of the decoding.

  24. def get[A](uri: Uri)(f: (Response) ⇒ Task[A]): Task[A]

    Submits a GET request, and provides a callback to process the response.

    Submits a GET request, and provides a callback to process the response.

    uri

    The URI to GET

    f

    A callback for the response to a GET on uri. The underlying HTTP connection is disposed when the returned task completes. Attempts to read the response body afterward will result in an error.

    returns

    The result of applying f to the response to req

  25. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  26. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  27. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  28. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  29. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  30. val open: Service[Request, DisposableResponse]
  31. val shutdown: Task[Unit]
  32. def shutdownNow(): Unit

    Shuts this client down, and blocks until complete.

  33. def status(req: Task[Request]): Task[Status]

    Submits a request and returns the response status

  34. def status(req: Request): Task[Status]

    Submits a request and returns the response status

  35. def streaming[A](req: Task[Request])(f: (Response) ⇒ Process[Task, A]): Process[Task, A]
  36. def streaming[A](req: Request)(f: (Response) ⇒ Process[Task, A]): Process[Task, A]
  37. def successful(req: Task[Request]): Task[Boolean]

    Submits a request and returns true if and only if the response status is successful

  38. def successful(req: Request): Task[Boolean]

    Submits a request and returns true if and only if the response status is successful

  39. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  40. def toHttpService: HttpService

    Returns this client as an HttpService.

    Returns this client as an HttpService. It is the responsibility of callers of this service to run the response body to dispose of the underlying HTTP connection.

    This is intended for use in proxy servers. fetch, fetchAs, toService, and streaming are safer alternatives, as their signatures guarantee disposal of the HTTP connection.

  41. def toService[A](f: (Response) ⇒ Task[A]): Service[Request, A]

    Returns this client as a Service.

    Returns this client as a Service. All connections created by this service are disposed on completion of callback task f.

    This method effectively reverses the arguments to fetch, and is preferred when an HTTP client is composed into a larger Kleisli function, or when a common response callback is used by many call sites.

  42. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  43. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  44. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  45. def [B](y: B): (Client, B)
    Implicit
    This member is added by an implicit conversion from Client to ArrowAssoc[Client] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Deprecated Value Members

  1. def getAs[A](s: String)(implicit d: EntityDecoder[A]): Task[A]
    Annotations
    @deprecated
    Deprecated

    (Since version 0.14) Use expect

  2. def getAs[A](uri: Uri)(implicit d: EntityDecoder[A]): Task[A]

    Submits a GET request and decodes the response.

    Submits a GET request and decodes the response. The underlying HTTP connection is closed at the completion of the decoding.

    Annotations
    @deprecated
    Deprecated

    (Since version 0.14) Use expect

  3. def prepAs[T](req: Task[Request])(implicit d: EntityDecoder[T]): Task[T]
    Annotations
    @deprecated
    Deprecated

    (Since version 0.14) Use expect

  4. def prepAs[A](req: Request)(implicit d: EntityDecoder[A]): Task[A]
    Annotations
    @deprecated
    Deprecated

    (Since version 0.14) Use expect

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from Client to any2stringadd[Client]

Inherited by implicit conversion StringFormat from Client to StringFormat[Client]

Inherited by implicit conversion Ensuring from Client to Ensuring[Client]

Inherited by implicit conversion ArrowAssoc from Client to ArrowAssoc[Client]

Ungrouped