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.
- 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::api::management_canister::http_request::http_request
that implements thetower::Service
trait. Its functionality can be extended by composing so-called tower middlewares. - Cycles
Accounting - A middleware to handle cycles accounting, i.e. verify if sufficiently many cycles are available in a request.
How cycles are estimated is given by
CyclesEstimator
- Cycles
Cost Estimator - Estimate the exact minimum cycles amount required to send an HTTPs outcall as specified here.
- IcError
- Error returned by the Internet Computer when making an HTTPs outcall.
- IcHttp
Request With Cycles IcHttpRequest
specifying how many cycles should be attached for the HTTPs outcall.
Enums§
- Cycles
Accounting Error - Error return by the
CyclesAccounting
middleware.
Traits§
- Cycles
Charging Policy - Estimate the amount of cycles to charge for a single HTTPs outcall.
- Https
Outcall Error - Characterize errors that are specific to HTTPs outcalls.
- MaxResponse
Bytes Request Extension - Add support for max response bytes.
- Transform
Context Request Extension - Add support for transform context to specify how the response will be canonicalized by the replica to maximize chances of consensus.