HttpClientF2

com.malliina.http.io.HttpClientF2
class HttpClientF2[F[_]](val client: OkHttpClient)(implicit evidence$1: Async[F]) extends HttpClientF[F], OkHttpBackend

Attributes

Graph
Supertypes
trait OkHttpBackend
class HttpClientF[F]
trait HttpClient[F]
trait Closeable
trait AutoCloseable
class Object
trait Matchable
class Any
Show all
Known subtypes
class HttpClientIO

Members list

Type members

Inherited classlikes

implicit class FOps[T](f: F[T])

Attributes

Inherited from:
HttpClient
Supertypes
class Object
trait Matchable
class Any

Value members

Concrete methods

override def raw(request: Request): F[Response]

Attributes

Definition Classes
HttpClient
def socket(url: FullUrl, headers: Map[String, String]): Resource[F, WebSocketF[F]]
override def streamed[T](request: Request)(consume: Response => F[T]): F[T]

Attributes

Definition Classes
HttpClient

Inherited methods

override def close(): Unit

Attributes

Definition Classes
OkHttpBackend -> Closeable -> AutoCloseable
Inherited from:
OkHttpBackend
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 parameters

headers

http headers

to

destination, a file

url

url to download

Attributes

Returns

bytes written

Inherited from:
HttpClient
override def execute(request: Request): F[OkHttpResponse]

Attributes

Definition Classes
HttpClientF -> HttpClient
Inherited from:
HttpClientF
override def fail[T](e: Exception): F[T]

Attributes

Definition Classes
HttpClientF -> HttpClient
Inherited from:
HttpClientF
override def flatMap[T, U](t: F[T])(f: T => F[U]): F[U]

Attributes

Definition Classes
HttpClientF -> HttpClient
Inherited from:
HttpClientF
def get(url: FullUrl, headers: Map[String, String]): F[OkHttpResponse]

Attributes

Inherited from:
HttpClient
def getAs[T : Decoder](url: FullUrl, headers: Map[String, String]): F[T]

Attributes

Inherited from:
HttpClient
def multiPart(url: FullUrl, headers: Map[String, String], parts: Map[String, String], files: Seq[MultiPartFile]): F[OkHttpResponse]

Attributes

Inherited from:
HttpClient
def parse[T : Decoder](response: OkHttpResponse, url: FullUrl): 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 parameters

T

type to parse

Value parameters

response

HTTP response

url

the request URL

Attributes

Returns

a parsed response

Inherited from:
HttpClient
def post(url: FullUrl, body: RequestBody, headers: Map[String, String]): F[OkHttpResponse]

Attributes

Inherited from:
HttpClient
def postAs[W : Encoder, T : Decoder](url: FullUrl, json: W, headers: Map[String, String]): F[T]

Attributes

Inherited from:
HttpClient
def postFile(url: FullUrl, mediaType: MediaType, file: Path, headers: Map[String, String]): F[OkHttpResponse]

Attributes

Inherited from:
HttpClient
def postForm(url: FullUrl, form: Map[String, String], headers: Map[String, String]): F[OkHttpResponse]

Attributes

Inherited from:
HttpClient
def postFormAs[T : Decoder](url: FullUrl, form: Map[String, String], headers: Map[String, String]): F[T]

Attributes

Inherited from:
HttpClient
def postJson(url: FullUrl, json: Json, headers: Map[String, String]): F[OkHttpResponse]

Attributes

Inherited from:
HttpClient
def postJsonAs[T : Decoder](url: FullUrl, json: Json, headers: Map[String, String]): F[T]

Attributes

Inherited from:
HttpClient
override def success[T](t: T): F[T]

Attributes

Definition Classes
HttpClientF -> HttpClient
Inherited from:
HttpClientF

Concrete fields

val client: OkHttpClient

Implicits

Inherited implicits

final implicit def FOps[T](f: F[T]): FOps[T]

Attributes

Inherited from:
HttpClient