HttpClient

automorph.transport.http.client.HttpClient
See theHttpClient companion object
final case class HttpClient[Effect[_]](effectSystem: EffectSystem[Effect], url: URI, method: HttpMethod, builder: Builder) extends ClientTransport[Effect, Context]

Standard JRE HttpClient HTTP & WebSocket client message transport plugin.

Uses the supplied RPC request as HTTP request body and returns HTTP response body as a result.

Type parameters

Effect

effect type

Value parameters

builder

HttpClient builder (default: empty)

effectSystem

effect system plugin

method

HTTP request method (default: POST)

url

remote API HTTP or WebSocket URL

Attributes

Constructor

Creates an HttpClient HTTP & WebSocket message client transport plugin.

See also
Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait ClientTransport[Effect, Context]
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

Sends a request to a remote endpoint and retrieves the response.

Sends a request to a remote endpoint and retrieves the response.

An optional request context is used to supply additional information needed to send the request.

Value parameters

mediaType

message media (MIME) type.

requestBody

request message body

requestContext

request context

requestId

request correlation identifier

Attributes

Returns

response message and context

Definition Classes
override def close(): Effect[Unit]

Closes this client transport freeing the underlying resources.

Closes this client transport freeing the underlying resources.

Attributes

Returns

nothing

Definition Classes
override def context: Context

Creates default request context based on the configuration of this client transport.

Creates default request context based on the configuration of this client transport.

Attributes

Returns

request context based on the configuration of this client transport

Definition Classes
override def init(): Effect[Unit]

Initializes this client to invoke remote APIs.

Initializes this client to invoke remote APIs.

Attributes

Returns

active RPC server

Definition Classes

Sends a request to a remote endpoint without waiting for a response.

Sends a request to a remote endpoint without waiting for a response.

An optional request context is used to supply additional information needed to send the request.

Value parameters

mediaType

message media (MIME) type.

requestBody

request message body

requestContext

request context

requestId

request correlation identifier

Attributes

Returns

nothing

Definition Classes

Inherited methods

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product

Inherited fields

protected val logger: Logger

Attributes

Inherited from:
Logging (hidden)