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. - Json
RpcRequest Matcher - Matches
CanisterHttpRequests whose body is a JSON-RPC request. - Json
RpcResponse - A mocked JSON-RPC 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.
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.