Packages

trait Client[F[_]] extends AnyRef

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

Source
Client.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Client
  2. AnyRef
  3. 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

Abstract Value Members

  1. abstract def expect[A](s: String)(implicit d: EntityDecoder[F, A]): F[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.

  2. abstract def expect[A](uri: Uri)(implicit d: EntityDecoder[F, A]): F[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.

  3. abstract def expect[A](req: F[Request[F]])(implicit d: EntityDecoder[F, A]): F[A]
  4. abstract def expect[A](req: Request[F])(implicit d: EntityDecoder[F, A]): F[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.

  5. abstract def expectOr[A](s: String)(onError: (Response[F]) ⇒ F[Throwable])(implicit d: EntityDecoder[F, A]): F[A]
  6. abstract def expectOr[A](uri: Uri)(onError: (Response[F]) ⇒ F[Throwable])(implicit d: EntityDecoder[F, A]): F[A]
  7. abstract def expectOr[A](req: F[Request[F]])(onError: (Response[F]) ⇒ F[Throwable])(implicit d: EntityDecoder[F, A]): F[A]
  8. abstract def expectOr[A](req: Request[F])(onError: (Response[F]) ⇒ F[Throwable])(implicit d: EntityDecoder[F, A]): F[A]
  9. abstract def fetch[A](req: F[Request[F]])(f: (Response[F]) ⇒ F[A]): F[A]

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

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

    req

    An effect 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

  10. abstract def fetch[A](req: Request[F])(f: (Response[F]) ⇒ F[A]): F[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

  11. abstract def fetchAs[A](req: F[Request[F]])(implicit d: EntityDecoder[F, A]): F[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.

  12. abstract def fetchAs[A](req: Request[F])(implicit d: EntityDecoder[F, A]): F[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.

  13. abstract def get[A](s: String)(f: (Response[F]) ⇒ F[A]): F[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.

  14. abstract def get[A](uri: Uri)(f: (Response[F]) ⇒ F[A]): F[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

  15. abstract def run(req: Request[F]): Resource[F, Response[F]]
  16. abstract def status(req: F[Request[F]]): F[Status]

    Submits a request and returns the response status

  17. abstract def status(req: Request[F]): F[Status]

    Submits a request and returns the response status

  18. abstract def stream(req: Request[F]): Stream[F, Response[F]]

    Run the request as a stream.

    Run the request as a stream. The response lifecycle is equivalent to the returned Stream's.

  19. abstract def successful(req: F[Request[F]]): F[Boolean]

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

  20. abstract def successful(req: Request[F]): F[Boolean]

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

  21. abstract def toHttpApp: HttpApp[F]

    Returns this client as an HttpApp.

    Returns this client as an HttpApp. 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, toKleisli, and streaming are safer alternatives, as their signatures guarantee disposal of the HTTP connection.

  22. abstract def toKleisli[A](f: (Response[F]) ⇒ F[A]): Kleisli[F, Request[F], A]

    Returns this client as a Kleisli.

    Returns this client as a Kleisli. 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.

  23. abstract def getAs[A](s: String)(implicit d: EntityDecoder[F, A]): F[A]
    Annotations
    @deprecated
    Deprecated

    (Since version 0.14) Use expect

  24. abstract def getAs[A](uri: Uri)(implicit d: EntityDecoder[F, A]): F[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

  25. abstract def prepAs[T](req: F[Request[F]])(implicit d: EntityDecoder[F, T]): F[T]
    Annotations
    @deprecated
    Deprecated

    (Since version 0.14) Use expect

  26. abstract def prepAs[A](req: Request[F])(implicit d: EntityDecoder[F, A]): F[A]
    Annotations
    @deprecated
    Deprecated

    (Since version 0.14) Use expect

  27. abstract def streaming[A](req: F[Request[F]])(f: (Response[F]) ⇒ Stream[F, A]): Stream[F, A]
    Annotations
    @deprecated
    Deprecated

    (Since version 0.19.0-M4) Use Stream.eval(req).flatMap(client.stream).flatMap(f)

  28. abstract def streaming[A](req: Request[F])(f: (Response[F]) ⇒ Stream[F, A]): Stream[F, A]
    Annotations
    @deprecated
    Deprecated

    (Since version 0.19.0-M4) Use client.stream(req).flatMap(f)

  29. abstract def toHttpService: HttpService[F]

    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, toKleisli, and streaming are safer alternatives, as their signatures guarantee disposal of the HTTP connection.

    Annotations
    @deprecated
    Deprecated

    (Since version 0.19) Use toHttpApp. Call .mapF(OptionT.liftF) if OptionT is really desired.

  30. abstract def toService[A](f: (Response[F]) ⇒ F[A]): Service[F, Request[F], A]
    Annotations
    @deprecated
    Deprecated

    (Since version 0.18) Use toKleisli

Concrete 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[F] to any2stringadd[Client[F]] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (Client[F], B)
    Implicit
    This member is added by an implicit conversion from Client[F] to ArrowAssoc[Client[F]] 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[F]) ⇒ Boolean, msg: ⇒ Any): Client[F]
    Implicit
    This member is added by an implicit conversion from Client[F] to Ensuring[Client[F]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  9. def ensuring(cond: (Client[F]) ⇒ Boolean): Client[F]
    Implicit
    This member is added by an implicit conversion from Client[F] to Ensuring[Client[F]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  10. def ensuring(cond: Boolean, msg: ⇒ Any): Client[F]
    Implicit
    This member is added by an implicit conversion from Client[F] to Ensuring[Client[F]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  11. def ensuring(cond: Boolean): Client[F]
    Implicit
    This member is added by an implicit conversion from Client[F] to Ensuring[Client[F]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  12. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  14. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. def formatted(fmtstr: String): String
    Implicit
    This member is added by an implicit conversion from Client[F] to StringFormat[Client[F]] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  16. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  17. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  18. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  19. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  20. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  21. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  22. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  23. def toString(): String
    Definition Classes
    AnyRef → Any
  24. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  27. def [B](y: B): (Client[F], B)
    Implicit
    This member is added by an implicit conversion from Client[F] to ArrowAssoc[Client[F]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Inherited from AnyRef

Inherited from Any

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

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

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

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

Ungrouped