pub trait CopilotHttp: Send + Sync {
// Required methods
fn post_form<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
url: &'life1 str,
form: &'life2 [(&'life3 str, &'life4 str)],
) -> Pin<Box<dyn Future<Output = Result<InjectedHttpResponse, CopilotAuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Self: 'async_trait;
fn get_bearer<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
url: &'life1 str,
bearer: &'life2 str,
headers: &'life3 [(&'life4 str, &'life5 str)],
) -> Pin<Box<dyn Future<Output = Result<InjectedHttpResponse, CopilotAuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
Self: 'async_trait;
}Expand description
Injectable HTTP surface so tests never touch the network.
Required Methods§
fn post_form<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
url: &'life1 str,
form: &'life2 [(&'life3 str, &'life4 str)],
) -> Pin<Box<dyn Future<Output = Result<InjectedHttpResponse, CopilotAuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Self: 'async_trait,
Sourcefn get_bearer<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
url: &'life1 str,
bearer: &'life2 str,
headers: &'life3 [(&'life4 str, &'life5 str)],
) -> Pin<Box<dyn Future<Output = Result<InjectedHttpResponse, CopilotAuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
Self: 'async_trait,
fn get_bearer<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
url: &'life1 str,
bearer: &'life2 str,
headers: &'life3 [(&'life4 str, &'life5 str)],
) -> Pin<Box<dyn Future<Output = Result<InjectedHttpResponse, CopilotAuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
Self: 'async_trait,
GET with bearer auth and extra request headers (mint path attaches GitHub/Copilot headers).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".