Packages

sealed abstract class JavaNetClientBuilder[F[_]] extends BackendBuilder[F, Client[F]]

Builder for a Client backed by on java.net.HttpUrlConnection.

The java.net client adds no dependencies beyond http4s-client. This client is generally not production grade, but convenient for exploration in a REPL.

All I/O operations in this client are blocking.

Source
JavaNetClientBuilder.scala
Linear Supertypes
BackendBuilder[F, Client[F]], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. JavaNetClientBuilder
  2. BackendBuilder
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. def allocated: F[(Client[F], F[Unit])]

    Returns an effect that allocates a backend and an F[Unit] to release it.

    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.

    Definition Classes
    BackendBuilder
  2. val blocker: Blocker
  3. val connectTimeout: Duration
  4. def create: Client[F]

    Creates a Client.

    Creates a Client.

    The shutdown of this client is a no-op. Creation of the client allocates no resources, and any resources allocated while using this client are reclaimed by the JVM at its own leisure.

  5. val hostnameVerifier: Option[HostnameVerifier]
  6. val proxy: Option[Proxy]
  7. val readTimeout: Duration
  8. def resource: Resource[F, Client[F]]

    Returns the backend as a resource.

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

    Definition Classes
    JavaNetClientBuilder → BackendBuilder
  9. val sslSocketFactory: Option[SSLSocketFactory]
  10. def stream: Stream[F, Client[F]]

    Returns the backend as a single-element stream.

    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.

    Definition Classes
    BackendBuilder
  11. def withBlocker(blocker: Blocker): JavaNetClientBuilder[F]
  12. def withConnectTimeout(connectTimeout: Duration): JavaNetClientBuilder[F]
  13. def withHostnameVerifier(hostnameVerifier: HostnameVerifier): JavaNetClientBuilder[F]
  14. def withHostnameVerifierOption(hostnameVerifier: Option[HostnameVerifier]): JavaNetClientBuilder[F]
  15. def withProxy(proxy: Proxy): JavaNetClientBuilder[F]
  16. def withProxyOption(proxy: Option[Proxy]): JavaNetClientBuilder[F]
  17. def withReadTimeout(readTimeout: Duration): JavaNetClientBuilder[F]
  18. def withSslSocketFactory(sslSocketFactory: SSLSocketFactory): JavaNetClientBuilder[F]
  19. def withSslSocketFactoryOption(sslSocketFactory: Option[SSLSocketFactory]): JavaNetClientBuilder[F]
  20. def withoutHostnameVerifier: JavaNetClientBuilder[F]
  21. def withoutProxy: JavaNetClientBuilder[F]
  22. def withoutSslSocketFactory: JavaNetClientBuilder[F]

Deprecated Value Members

  1. def withBlockingExecutionContext(blockingExecutionContext: ExecutionContext): JavaNetClientBuilder[F]
    Annotations
    @deprecated
    Deprecated

    (Since version 0.21.0) Use withBlocker instead