pub struct HttpRequestCanister<'agent>(_);
Expand description

A canister that can serve a HTTP request.

Implementations

Create an instance of a HttpRequestCanister interface pointing to the specified Canister ID.

Create a HttpRequestCanister interface from an existing canister object.

Performs a HTTP request, receiving a HTTP response.

Performs a HTTP request, receiving a HTTP response. T and C are the token and callback types for the streaming_strategy.

Performs a HTTP request over an update call. Unlike query calls, update calls must pass consensus and therefore cannot be tampered with by a malicious node.

Performs a HTTP request over an update call. Unlike query calls, update calls must pass consensus and therefore cannot be tampered with by a malicious node. T and C are the token and callback types for the streaming_strategy.

Retrieves the next chunk of a stream from a streaming callback, using the method from CallbackStrategy.

Retrieves the next chunk of a stream from a streaming callback, using the method from CallbackStrategy. T is the token type.

Methods from Deref<Target = Canister<'agent>>

Get the canister ID of this canister.

Create an AsyncCallBuilder to do an update call.

Create a SyncCallBuilder to do a query call.

Call request_status on the RequestId in a loop and return the response as a byte vector.

Creates a copy of this canister, changing the canister ID to the provided principal.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

The resulting type after dereferencing.

Dereferences the value.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more