pub struct HttpCallConfig {
pub connector: String,
pub method: HttpMethod,
pub path: Option<String>,
pub path_logic: Option<Template>,
pub headers: HashMap<String, String>,
pub body: Option<Value>,
pub body_logic: Option<Template>,
pub response_path: Option<String>,
pub timeout_ms: u64,
}Expand description
Configuration for the http_call integration function.
The actual HTTP implementation is provided by the service layer via AsyncFunctionHandler. This struct provides typed config validation and pre-compilation of JSONLogic expressions.
Unknown keys are rejected. A misspelled field previously parsed cleanly and
was discarded, so an http_call task could make its request and silently
throw the response away with no error at build time and none at dispatch.
Fields§
§connector: StringNamed connector reference (resolved by service layer)
method: HttpMethodHTTP method
path: Option<String>Static path string
path_logic: Option<Template>JSONLogic expression to compute path dynamically. Compiled once at
engine construction (LogicCompiler); read it through
HttpCallConfig::resolve_path rather than directly — that method
applies the static-path fallback and is the sanctioned read.
headers: HashMap<String, String>Static headers
body: Option<Value>Static request body
body_logic: Option<Template>JSONLogic expression to compute body dynamically. Compiled once at
engine construction; read it through HttpCallConfig::resolve_body.
response_path: Option<String>JSONPath/dot-path to extract from response and merge into context.
output is accepted as an alias, so a service layer can present one
destination-field name across its whole function catalogue. Supplying
both keys is a duplicate field error rather than a precedence rule.
timeout_ms: u64Request timeout in milliseconds (default: 30000)
Implementations§
Source§impl HttpCallConfig
impl HttpCallConfig
Sourcepub fn resolve_path(&self, ctx: &TaskContext<'_>) -> Result<Option<String>>
pub fn resolve_path(&self, ctx: &TaskContext<'_>) -> Result<Option<String>>
Resolve the request path: path_logic evaluated against the message
context when compiled, otherwise the static path. Ok(None) when
neither is set.
§Errors
As [resolve_string_field] — an evaluation failure propagates rather
than falling back to the static path.
Sourcepub fn resolve_body(&self, ctx: &TaskContext<'_>) -> Result<Option<Value>>
pub fn resolve_body(&self, ctx: &TaskContext<'_>) -> Result<Option<Value>>
Resolve the request body: body_logic when compiled, otherwise the
static body. Ok(None) when neither is set.
§Errors
As Self::resolve_path — an evaluation failure propagates rather than
falling back.
Trait Implementations§
Source§impl Clone for HttpCallConfig
impl Clone for HttpCallConfig
Source§fn clone(&self) -> HttpCallConfig
fn clone(&self) -> HttpCallConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more