HttpClientF

abstract class HttpClientF[F[_]](F: MonadError[F, Throwable]) extends HttpClient[F]
trait HttpClient[F]
trait Closeable
trait AutoCloseable
class Object
trait Matchable
class Any

Type members

Inherited classlikes

class FOps[T](f: F[T])
Inherited from
HttpClient

Value members

Concrete methods

override def execute(request: Request): F[OkHttpResponse]
Definition Classes
HttpClient
override def fail[T](e: Exception): F[T]
Definition Classes
HttpClient
override def flatMap[T, U](t: F[T])(f: T => F[U]): F[U]
Definition Classes
HttpClient
override def success[T](t: T): F[T]
Definition Classes
HttpClient

Inherited methods

def close(): Unit
Inherited from
HttpClient
def download(url: FullUrl, to: Path, headers: Map[String, String]): F[Either[StatusError, StorageSize]]

Downloads url to to, returning the number of bytes written to to.

Downloads url to to, returning the number of bytes written to to.

Value Params
headers

http headers

to

destination, a file

url

url to download

Returns

bytes written

Inherited from
HttpClient
def get(url: FullUrl, headers: Map[String, String]): F[OkHttpResponse]
Inherited from
HttpClient
def getAs[T](url: FullUrl, headers: Map[String, String])(`evidence$1`: Decoder[T]): F[T]
Inherited from
HttpClient
def multiPart(url: FullUrl, headers: Map[String, String], parts: Map[String, String], files: Seq[MultiPartFile]): F[OkHttpResponse]
Inherited from
HttpClient
def parse[T](response: OkHttpResponse, url: FullUrl)(`evidence$6`: Decoder[T]): F[T]

Parses the response as a T.

Parses the response as a T.

The returned Future fails with a ResponseError if parsing fails.

Type Params
T

type to parse

Value Params
response

HTTP response

url

the request URL

Returns

a parsed response

Inherited from
HttpClient
def post(url: FullUrl, body: RequestBody, headers: Map[String, String]): F[OkHttpResponse]
Inherited from
HttpClient
def postAs[W, T](url: FullUrl, json: W, headers: Map[String, String])(`evidence$2`: Encoder[W], `evidence$3`: Decoder[T]): F[T]
Inherited from
HttpClient
def postFile(url: FullUrl, mediaType: MediaType, file: Path, headers: Map[String, String]): F[OkHttpResponse]
Inherited from
HttpClient
def postForm(url: FullUrl, form: Map[String, String], headers: Map[String, String]): F[OkHttpResponse]
Inherited from
HttpClient
def postFormAs[T](url: FullUrl, form: Map[String, String], headers: Map[String, String])(`evidence$5`: Decoder[T]): F[T]
Inherited from
HttpClient
def postJson(url: FullUrl, json: Json, headers: Map[String, String]): F[OkHttpResponse]
Inherited from
HttpClient
def postJsonAs[T](url: FullUrl, json: Json, headers: Map[String, String])(`evidence$4`: Decoder[T]): F[T]
Inherited from
HttpClient
def raw(request: Request): F[Response]
Inherited from
HttpClient
def requestFor(url: FullUrl, headers: Map[String, String]): Builder
Inherited from
HttpClient
def streamed[T](request: Request)(consume: Response => F[T]): F[T]
Inherited from
HttpClient