BlazeClientBuilder

org.http4s.blaze.client.BlazeClientBuilder
See theBlazeClientBuilder companion object
sealed abstract class BlazeClientBuilder[F[_]]

Configure and obtain a BlazeClient

Attributes

asynchronousChannelGroup

custom AsynchronousChannelGroup to use other than the system default

bufferSize

internal buffer size of the blaze client

channelOptions

custom socket options

checkEndpointIdentification

require endpoint identification for secure requests according to RFC 2818, Section 3.1. If the certificate presented does not match the hostname of the request, the request fails with a CertificateException. This setting does not affect checking the validity of the cert via the sslContext's trust managers.

chunkBufferMaxSize

Size of the buffer that is used when Content-Length header is not specified.

connectTimeout

Duration a connection attempt times out after

customDnsResolver

customDnsResolver to use other than the system default

executionContextConfig

optional custom executionContext to run async computations.

idleTimeout

duration that a connection can wait without traffic being read or written before timeout

maxChunkSize

maximum size of chunked content chunks

maxConnectionsPerRequestKey

Map of RequestKey to number of max connections

maxHeaderLength

maximum length of headers

maxIdleDuration

maximum time a connection can be idle and still be borrowed. Helps deal with connections that are closed while idling in the pool for an extended period.

maxResponseLineSize

maximum length of the request line

maxTotalConnections

maximum connections the client will have at any specific time

maxWaitQueueLimit

maximum number requests waiting for a connection at any specific time

parserMode

lenient or strict parsing mode. The lenient mode will accept illegal chars but replaces them with � (0xFFFD)

requestTimeout

maximum duration from the submission of a request through reading the body before a timeout.

responseHeaderTimeout

duration between the submission of a request and the completion of the response header. Does not include time to read the response body.

retries

the number of times an idempotent request that fails with a SocketException will be retried. This is a means to deal with connections that expired while in the pool. Retries happen immediately. The default is 2. For a more sophisticated retry strategy, see the org.http4s.client.middleware.Retry middleware.

scheduler

execution scheduler

sslContext

Some custom SSLContext, or None if the default SSL context is to be lazily instantiated.

userAgent

optional custom user agent header

Companion:
object
Source:
BlazeClientBuilder.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Concise view

Type members

Types

Value members

Concrete methods

Returns the backend as a resource. Resource acquire waits until the backend is ready to process requests.

Returns the backend as a resource. Resource acquire waits until the backend is ready to process requests.

Attributes

Source:
BlazeClientBuilder.scala

Creates a blaze-client resource along with a BlazeClientState for monitoring purposes

Creates a blaze-client resource along with a BlazeClientState for monitoring purposes

Attributes

Source:
BlazeClientBuilder.scala

Attributes

Source:
BlazeClientBuilder.scala
def withCheckEndpointAuthentication(checkEndpointIdentification: Boolean): BlazeClientBuilder[F]

Attributes

Source:
BlazeClientBuilder.scala
def withChunkBufferMaxSize(chunkBufferMaxSize: Int): BlazeClientBuilder[F]

Attributes

Source:
BlazeClientBuilder.scala

Use an SSLContext obtained by SSLContext.getDefault() when making secure calls.

Use an SSLContext obtained by SSLContext.getDefault() when making secure calls.

Since 0.21, the creation is not deferred.

Attributes

Source:
BlazeClientBuilder.scala

Configures the compute thread pool used to run async computations.

Configures the compute thread pool used to run async computations.

This defaults to cats.effect.Async[F].executionContext. In almost all cases, it is desirable to use the default.

Attributes

Source:
BlazeClientBuilder.scala
def withMaxChunkSize(maxChunkSize: Int): BlazeClientBuilder[F]

Attributes

Source:
BlazeClientBuilder.scala
def withMaxConnectionsPerRequestKey(maxConnectionsPerRequestKey: RequestKey => Int): BlazeClientBuilder[F]

Attributes

Source:
BlazeClientBuilder.scala
def withMaxHeaderLength(maxHeaderLength: Int): BlazeClientBuilder[F]

Attributes

Source:
BlazeClientBuilder.scala

Time a connection can be idle and still be borrowed. Helps deal with connections that are closed while idling in the pool for an extended period. Duration.Inf means no timeout.

Time a connection can be idle and still be borrowed. Helps deal with connections that are closed while idling in the pool for an extended period. Duration.Inf means no timeout.

Attributes

Source:
BlazeClientBuilder.scala
def withMaxResponseLineSize(maxResponseLineSize: Int): BlazeClientBuilder[F]

Attributes

Source:
BlazeClientBuilder.scala
def withMaxTotalConnections(maxTotalConnections: Int): BlazeClientBuilder[F]

Attributes

Source:
BlazeClientBuilder.scala
def withMaxWaitQueueLimit(maxWaitQueueLimit: Int): BlazeClientBuilder[F]

Attributes

Source:
BlazeClientBuilder.scala
def withResponseHeaderTimeout(responseHeaderTimeout: Duration): BlazeClientBuilder[F]

Attributes

Source:
BlazeClientBuilder.scala

Number of times to immediately retry idempotent requests that fail with a SocketException.

Number of times to immediately retry idempotent requests that fail with a SocketException.

Attributes

Source:
BlazeClientBuilder.scala

Use the provided SSLContext when making secure calls

Use the provided SSLContext when making secure calls

Attributes

Source:
BlazeClientBuilder.scala

Disable secure calls

Disable secure calls

Attributes

Source:
BlazeClientBuilder.scala

Deprecated methods

Use some provided SSLContext when making secure calls, or disable secure calls with None

Use some provided SSLContext when making secure calls, or disable secure calls with None

Attributes

Deprecated
[Since version 0.22.0-M1] Use withDefaultSslContext, withSslContext or withoutSslContext to set the SSLContext
Source:
BlazeClientBuilder.scala

Inherited methods

def stream: Stream[F, A]

Returns the backend as a single-element stream. The stream does not emit until the backend is ready to process requests. The backend is shut down when the stream is finalized.

Returns the backend as a single-element stream. The stream does not emit until the backend is ready to process requests. The backend is shut down when the stream is finalized.

Attributes

Inherited from:
BackendBuilder (hidden)
Source:
BackendBuilder.scala

Deprecated and Inherited methods

def allocated: F[(A, F[Unit])]

Returns an effect that allocates a backend and an F[Unit] to release it. The returned F waits until the backend is ready to process requests. The second element of the tuple shuts down the backend when run.

Returns an effect that allocates a backend and an F[Unit] to release it. The returned F waits until the backend is ready to process requests. The second element of the tuple shuts down the backend when run.

Unlike resource and stream, there is no automatic release of the backend. This function is intended for REPL sessions, tests, and other situations where composing a cats.effect.Resource or fs2.Stream is not tenable. resource or stream is recommended wherever possible.

Attributes

Deprecated
true
Inherited from:
BackendBuilder (hidden)
Source:
BackendBuilder.scala

Concrete fields

Attributes

Source:
BlazeClientBuilder.scala
val sslContext: SSLContextOption

Attributes

Source:
BlazeClientBuilder.scala