Skip to main content

Crate graphrt_http

Crate graphrt_http 

Source
Expand description

§graphrt-http

Outbound HTTP for workflows:

  • HttpClient: a shared client service enforcing an EgressPolicy (SSRF protection, host allow/deny lists, redirect re-validation, response size caps, no environment proxies).
  • HttpRequestNode: the http-request node.
use graphrt_core::{Registry, Services};
use graphrt_http::{EgressPolicy, HttpClient};

let mut registry = Registry::with_builtins();
graphrt_http::register(&mut registry);
let services = Services::new().with(HttpClient::new(EgressPolicy::default())?);

Structs§

EgressPolicy
Rules for outbound HTTP requests made by workflow nodes.
HttpClient
HTTP client shared by HTTP-calling nodes. Register it in graphrt_core::Services; when absent, nodes use a client with the default (restrictive) EgressPolicy.
HttpFileResolver
Downloads http(s) file URLs with a size cap.
HttpRequestNode
Makes an HTTP request.

Enums§

ClientError
Error building an HttpClient.
EgressError
Reason a destination was refused.

Constants§

INLINE_FILE_LIMIT
Binary responses up to this size are returned inline as data: URL files.
KIND
Node kind handled by HttpRequestNode.

Functions§

descriptor
Catalog descriptor of the http-request node.
is_public
Whether an address is globally routable (safe to contact from a multi-tenant runtime).
register
Register the http-request node kind.