pub struct HttpServerConfig {
pub scheme: String,
pub host: String,
pub port: u16,
pub path: String,
pub max_request_body: usize,
pub max_response_body: usize,
pub max_inflight_requests: usize,
pub method: Option<String>,
pub tls_config: Option<ServerTlsConfig>,
}Expand description
Configuration for an HTTP server (consumer) endpoint.
Fields§
§scheme: StringURI scheme (“http” or “https”) parsed from the endpoint URI.
host: StringBind address, e.g. “0.0.0.0” or “127.0.0.1”.
port: u16TCP port to listen on.
path: StringURL path this consumer handles, e.g. “/orders”.
max_request_body: usizeMaximum request body size in bytes.
max_response_body: usizeMaximum response body size for materializing streams in bytes.
max_inflight_requests: usizeMaximum number of in-flight requests handled concurrently by this server.
method: Option<String>HTTP method this consumer handles (e.g. "GET"). When Some,
the consumer registers as a method-aware REST endpoint and the
path is treated as a template (e.g. /users/{id} is matched
against any /users/<value>). When None, the consumer
registers in the legacy path-only api_routes registry.
Extracted from the httpMethod= URI param at config build time.
tls_config: Option<ServerTlsConfig>Server-side TLS config. Populated from tlsCert/tlsKey URI params.
None for plain HTTP servers.
Implementations§
Source§impl HttpServerConfig
impl HttpServerConfig
pub fn from_uri_with_defaults( uri: &str, config: &HttpConfig, ) -> Result<Self, CamelError>
Trait Implementations§
Source§impl Clone for HttpServerConfig
impl Clone for HttpServerConfig
Source§fn clone(&self) -> HttpServerConfig
fn clone(&self) -> HttpServerConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more