object OkHttpBuilder
Builder for a org.http4s.client.Client with an OkHttp backend
- Source
- OkHttpBuilder.scala
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- OkHttpBuilder
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- All
Value Members
-
def
apply[F[_]](okHttpClient: OkHttpClient, blockingExecutionContext: ExecutionContext)(implicit F: ConcurrentEffect[F], cs: ContextShift[F]): OkHttpBuilder[F]
Creates a builder.
Creates a builder.
- okHttpClient
the underlying client.
- blockingExecutionContext
an execution context onto which all blocking I/O operations will be shifted.
-
def
withDefaultClient[F[_]](blockingExecutionContext: ExecutionContext)(implicit F: ConcurrentEffect[F], cs: ContextShift[F]): Resource[F, OkHttpBuilder[F]]
Create a builder with a default OkHttp client.
Create a builder with a default OkHttp client. The builder is returned as a
Resource
so we shut down the OkHttp client that we create.- blockingExecutionContext
an execution context onto which all blocking I/O operations will be shifted.