Trait HttpRequestor
Source pub trait HttpRequestor: Send + Sync {
// Required methods
fn remote_addr(&self) -> String;
fn remote_device(&self) -> Option<DeviceId>;
fn request_ext<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
req: &'life1 mut Option<Request>,
conn_info: Option<&'life2 mut HttpRequestConnectionInfo>,
) -> Pin<Box<dyn Future<Output = BuckyResult<Response>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn clone_requestor(&self) -> Box<dyn HttpRequestor>;
fn stop<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided methods
fn add_default_headers(&self, req: Request) -> Request { ... }
fn request<'life0, 'async_trait>(
&'life0 self,
req: Request,
) -> Pin<Box<dyn Future<Output = BuckyResult<Response>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn request_with_conn_info<'life0, 'life1, 'async_trait>(
&'life0 self,
req: Request,
conn_info: Option<&'life1 mut HttpRequestConnectionInfo>,
) -> Pin<Box<dyn Future<Output = BuckyResult<Response>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn request_with_conn_info_timeout<'life0, 'life1, 'async_trait>(
&'life0 self,
req: Request,
conn_info: Option<&'life1 mut HttpRequestConnectionInfo>,
dur: Duration,
) -> Pin<Box<dyn Future<Output = BuckyResult<Response>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn request_timeout<'life0, 'async_trait>(
&'life0 self,
req: Request,
dur: Duration,
) -> Pin<Box<dyn Future<Output = BuckyResult<Response>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn request_ext_timeout<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
req: &'life1 mut Option<Request>,
dur: Duration,
conn_info: Option<&'life2 mut HttpRequestConnectionInfo>,
) -> Pin<Box<dyn Future<Output = BuckyResult<Response>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
}