package client
- Alphabetic
- Public
- All
Type Members
-
trait
AsyncClient extends AsyncClientCompat with HttpClientFactory[AsyncClient] with AutoCloseable with LogSupport
A standard async http client interface for Rx[_]
- trait AsyncClientCompat extends AnyRef
- class AsyncClientImpl extends AsyncClient
-
trait
HttpChannel extends AutoCloseable
A low-level interface for sending HTTP requests without managing retries nor filters.
A low-level interface for sending HTTP requests without managing retries nor filters. This interface abstracts away the backend implementation (e.g., Java Http client, Ajax client, OkHttp client, etc)
-
trait
HttpChannelConfig extends AnyRef
Contains only http channel related configurations in HttpClientConfig
- trait HttpClientBackend extends AnyRef
-
case class
HttpClientConfig(name: String = "default", backend: HttpClientBackend = Compat.defaultHttpClientBackend, requestFilter: (Request) ⇒ Request = identity, responseFilter: (Response) ⇒ Response = identity, rpcEncoding: RPCEncoding = RPCEncoding.JSON, retryContext: RetryContext = ..., codecFactory: MessageCodecFactory = ..., circuitBreaker: CircuitBreaker = ..., connectTimeout: Duration = Duration(90, TimeUnit.SECONDS), readTimeout: Duration = Duration(90, TimeUnit.SECONDS), clientFilter: RxHttpFilter = RxHttpFilter.identity, httpLoggerConfig: HttpLoggerConfig = ..., httpLoggerProvider: (HttpLoggerConfig) ⇒ HttpLogger = ..., loggingFilter: (HttpLogger) ⇒ HttpClientFilter = ..., useFetchAPI: Boolean = false, useHttp1: Boolean = false) extends HttpChannelConfig with Product with Serializable
A common immutable configuration for all HTTP clients in airframe-http.
A common immutable configuration for all HTTP clients in airframe-http. To modify any configuration, use withXXX methods.
The generated HTTP client has multiple layers of filters:
- requestFilter: A filter to modify the request before sending it to the backend. This can be used for adding common HTTP headers (e.g., User-Agent, Authentication header, etc.)
- clientFilter: A filter to modify the request/response.
- loggingFilter: A filter to log individual requests and responses, including retried requests. The default behavior is logging each request with its response stats to log/http_client.json file.
- responseFilter: A filter to modify the response before returning it to the caller.
-
case class
HttpClientContext(clientName: String, rpcMethod: Option[RPCMethod] = None, rpcInput: Option[Any] = None) extends Product with Serializable
Provide a request context
-
trait
HttpClientFactory[ClientImpl] extends AnyRef
Interface for customizing config for each requests
-
trait
HttpClientFilter extends AnyRef
A filter for intercepting HTTP requests using the information of HttpClientContext.
A filter for intercepting HTTP requests using the information of HttpClientContext. If HttpClientContext is not required, use RxHttpFilter instead.
-
class
HttpClientLoggingFilter extends HttpClientFilter with AutoCloseable with LogSupport
A client-side filter for logging HTTP requests and responses
-
class
JavaHttpClientChannel extends HttpChannel with LogSupport
Http connection implementation using Http Client of Java 11
-
trait
SyncClient extends SyncClientCompat with HttpClientFactory[SyncClient] with AutoCloseable
A standard blocking http client interface
-
trait
SyncClientCompat extends AnyRef
Scala 2 specific helper method to make an RPC request
- class SyncClientImpl extends SyncClient
-
class
URLConnectionChannel extends HttpChannel
Java8-compatible HTTP channel implementation based on {{URL.openConnection}}
Value Members
- object HttpClientContext extends Serializable
- object HttpClientFilter
-
object
HttpClients extends LogSupport
Implements a common logic for HTTP clients, such as retry patterns, error handling, RPC response handling, etc.
- object JavaHttpClientBackend extends HttpClientBackend
Deprecated Value Members
-
object
URLConnectionClientBackend extends HttpClientBackend
- Annotations
- @deprecated
- Deprecated
(Since version 24.4.0) This backend will be used automatically for Java8. No need to explicitly set this backend