pub trait HttpClient {
    // Required method
    fn request<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        ctx: &'life1 Context,
        arg: &'life2 HttpRequest
    ) -> Pin<Box<dyn Future<Output = RpcResult<HttpResponse>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;

    // Provided method
    fn contract_id() -> &'static str { ... }
}
Expand description

HttpClient - issue outgoing http requests via an external provider To use this capability, the actor must be linked with “wasmcloud:httpclient” wasmbus.contractId: wasmcloud:httpclient wasmbus.providerReceive

Required Methods§

source

fn request<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, ctx: &'life1 Context, arg: &'life2 HttpRequest ) -> Pin<Box<dyn Future<Output = RpcResult<HttpResponse>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Issue outgoing http request

Provided Methods§

source

fn contract_id() -> &'static str

returns the capability contract id for this interface

Implementors§