pub struct HttpRequestNode { /* private fields */ }Expand description
Makes an HTTP request.
Outputs: status_code, body (text; empty for binary responses), headers
(object, lower-case names), files (binary responses as inline files) and, for
JSON content types, json (the parsed body, or null when the body is not valid
JSON — the parse error is reported in metadata json_error; set
parse_json: strict to fail instead).
Text bodies honour the charset content-type parameter for UTF-8, ISO-8859-1 and
windows-1252; other undecodable text is decoded lossily and flagged with
metadata body_lossy: true.
Redirects are followed by the node itself (up to the policy’s max_redirects,
each hop re-validated). When a hop changes origin (scheme, host or port), every
credential header is dropped: authorization, cookie, proxy-authorization,
the configured custom auth header and any header whose value came from a secret.
Node-level timeout and max_response_bytes can only lower the limits of the
host’s EgressPolicy, never raise them.
Implementations§
Source§impl HttpRequestNode
impl HttpRequestNode
Sourcepub fn from_doc(doc: &NodeDoc) -> Result<Self, ConfigError>
pub fn from_doc(doc: &NodeDoc) -> Result<Self, ConfigError>
Build from a node document.
Trait Implementations§
Source§impl Debug for HttpRequestNode
impl Debug for HttpRequestNode
Source§impl Node for HttpRequestNode
impl Node for HttpRequestNode
Source§fn run(&self, ctx: NodeContext) -> BoxFuture<'_, NodeResult>
fn run(&self, ctx: NodeContext) -> BoxFuture<'_, NodeResult>
Source§fn inputs(&self) -> Vec<Selector>
fn inputs(&self) -> Vec<Selector>
crate::graph::Graph::build rejects selectors
whose namespace is neither a node id nor sys / env / conversation
(catching typos at load time) and warns about references into other
container bodies. Return every selector the node may read, including
placeholders inside templates.