HttpClientIO

class HttpClientIO(val client: OkHttpClient) extends HttpClientF[[A] =>> IO[A]] with OkHttpBackend
Companion
object
trait OkHttpBackend
class HttpClientF[[A] =>> IO[A]]
trait HttpClient[[A] =>> IO[A]]
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 raw(request: Request): IO[Response]
Definition Classes
HttpClient
override def streamed[T](request: Request)(consume: Response => IO[T]): IO[T]
Definition Classes
HttpClient

Inherited methods

override def close(): Unit
Definition Classes
OkHttpBackend -> Closeable -> AutoCloseable
Inherited from
OkHttpBackend
def download(url: FullUrl, to: Path, headers: Map[String, String]): IO[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
override def execute(request: Request): IO[OkHttpResponse]
Definition Classes
HttpClientF -> HttpClient
Inherited from
HttpClientF
override def fail[T](e: Exception): IO[T]
Definition Classes
HttpClientF -> HttpClient
Inherited from
HttpClientF
override def flatMap[T, U](t: IO[T])(f: T => IO[U]): IO[U]
Definition Classes
HttpClientF -> HttpClient
Inherited from
HttpClientF
def get(url: FullUrl, headers: Map[String, String]): IO[OkHttpResponse]
Inherited from
HttpClient
def getAs[T](url: FullUrl, headers: Map[String, String])(`evidence$1`: Decoder[T]): IO[T]
Inherited from
HttpClient
def multiPart(url: FullUrl, headers: Map[String, String], parts: Map[String, String], files: Seq[MultiPartFile]): IO[OkHttpResponse]
Inherited from
HttpClient
def parse[T](response: OkHttpResponse, url: FullUrl)(`evidence$6`: Decoder[T]): IO[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]): IO[OkHttpResponse]
Inherited from
HttpClient
def postAs[W, T](url: FullUrl, json: W, headers: Map[String, String])(`evidence$2`: Encoder[W], `evidence$3`: Decoder[T]): IO[T]
Inherited from
HttpClient
def postFile(url: FullUrl, mediaType: MediaType, file: Path, headers: Map[String, String]): IO[OkHttpResponse]
Inherited from
HttpClient
def postForm(url: FullUrl, form: Map[String, String], headers: Map[String, String]): IO[OkHttpResponse]
Inherited from
HttpClient
def postFormAs[T](url: FullUrl, form: Map[String, String], headers: Map[String, String])(`evidence$5`: Decoder[T]): IO[T]
Inherited from
HttpClient
def postJson(url: FullUrl, json: Json, headers: Map[String, String]): IO[OkHttpResponse]
Inherited from
HttpClient
def postJsonAs[T](url: FullUrl, json: Json, headers: Map[String, String])(`evidence$4`: Decoder[T]): IO[T]
Inherited from
HttpClient
def requestFor(url: FullUrl, headers: Map[String, String]): Builder
Inherited from
HttpClient
override def success[T](t: T): IO[T]
Definition Classes
HttpClientF -> HttpClient
Inherited from
HttpClientF

Concrete fields

val client: OkHttpClient