Crate canhttp

Crate canhttp 

Source
Expand description

Library to make HTTPs outcalls from a canister on the Internet Computer, leveraging the modularity of the tower framework.

Re-exports§

pub use convert::ConvertServiceBuilder;

Modules§

convert
Fallible conversion from one type to another that can be used as a tower middleware.
cycles
Middleware to handle cycles accounting.
http
Middleware to add an HTTP translation layer.
observability
Middleware that adds high level observability (e.g., logging, metrics) to a Service.
retry
Middleware for retrying “failed” requests.

Structs§

Client
Thin wrapper around ic_cdk::management_canister::http_request that implements the tower::Service trait. Its functionality can be extended by composing so-called tower middlewares.

Enums§

IcError
Error returned by the Internet Computer when making an HTTPs outcall.

Traits§

HttpsOutcallError
Characterize errors that are specific to HTTPs outcalls.
MaxResponseBytesRequestExtension
Add support for max response bytes.
TransformContextRequestExtension
Add support for transform context to specify how the response will be canonicalized by the replica to maximize chances of consensus.