Skip to main content

HttpExecutor

Trait HttpExecutor 

Source
pub trait HttpExecutor: Send + Sync {
    // Required method
    fn execute_request<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        method: &'life1 str,
        path: &'life2 str,
        body: Option<JsonValue>,
    ) -> Pin<Box<dyn Future<Output = Result<JsonValue, ExecutionError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}
Expand description

Trait for making HTTP requests during execution.

This abstraction allows the executor to be used with different HTTP clients and enables easy testing with mock implementations.

Required Methods§

Source

fn execute_request<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, method: &'life1 str, path: &'life2 str, body: Option<JsonValue>, ) -> Pin<Box<dyn Future<Output = Result<JsonValue, ExecutionError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Execute an HTTP request.

Implementors§