Expand description
Library to mock HTTP outcalls on the Internet Computer leveraging the ic_canister_runtime
crate’s Runtime trait as well as PocketIc.
Structs§
- AnyCanister
Http Request Matcher - Implementation of
CanisterHttpRequestMatcherthat matches all requests. - Canister
Http Reject - A wrapper over
CanisterHttpRejectthat offers a fluent API to create instances. - Canister
Http Reply - A wrapper over
CanisterHttpReplythat offers a fluent API to create instances. - Http
Request Matcher - Matches
CanisterHttpRequests whose body can be deserialized and matched byB. - Http
Response - A mocked HTTP outcall response.
- Mock
Http Outcall - A mocked HTTP outcall with a mocked canister response and a
CanisterHttpRequestMatcherto find matching requests. - Mock
Http Outcall Builder - The result of calling
MockHttpOutcallsBuilder::given, used to add a new mock to aMockHttpOutcallsBuilder. See therespond_withmethod. - Mock
Http Outcalls - A collection of HTTP outcall mocks.
- Mock
Http Outcalls Builder - A
MockHttpOutcallsBuilderto create aMockHttpOutcallswith a fluent API. - Pocket
IcRuntime RuntimeusingPocketIcto make calls to canisters.- Single
Json RpcMatcher - Matches the body of a single JSON-RPC request.
Traits§
- Canister
Http Request Matcher - A trait that allows checking if a given
CanisterHttpRequestmatches an HTTP outcall mock. - Execute
Http Outcall Mocks - Execute HTTP outcall mocks.
Type Aliases§
- Batch
Json RpcRequest Matcher - Matches
CanisterHttpRequests whose body is a batch JSON-RPC request. - Batch
Json RpcResponse - A mocked batch JSON-RPC HTTP outcall response.
- Json
RpcRequest Matcher - Matches
CanisterHttpRequests whose body is a single JSON-RPC request. - Json
RpcResponse - A mocked single JSON-RPC HTTP outcall response.