HttpClientConfig
wvlet.airframe.http.client.HttpClientConfig
case class HttpClientConfig(name: String, backend: HttpClientBackend, requestFilter: Request => Request, responseFilter: Response => Response, rpcEncoding: RPCEncoding, retryContext: RetryContext, codecFactory: MessageCodecFactory, circuitBreaker: CircuitBreaker, connectTimeout: Duration, readTimeout: Duration, clientFilter: RxHttpFilter, httpLoggerConfig: HttpLoggerConfig, httpLoggerProvider: HttpLoggerConfig => HttpLogger, loggingFilter: HttpLogger => HttpClientFilter, useFetchAPI: Boolean, useHttp1: Boolean) extends HttpChannelConfig
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.
Attributes
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait HttpChannelConfigclass Objecttrait Matchableclass Any
Members list
In this article