Proxy an HTTP request through the plugin's custom fetch.
(
&self,
url: &str,
method: &str,
headers: &std::collections::HashMap<String, String>,
body: Option<&str>,
)
| 254 | |
| 255 | /// Proxy an HTTP request through the plugin's custom fetch. |
| 256 | pub async fn auth_fetch( |
| 257 | &self, |
| 258 | url: &str, |
| 259 | method: &str, |
| 260 | headers: &std::collections::HashMap<String, String>, |
| 261 | body: Option<&str>, |
| 262 | ) -> Result<AuthFetchResult, PluginSubprocessError> { |
| 263 | let params = serde_json::json!({ |
| 264 | "url": url, |
| 265 | "method": method, |
| 266 | "headers": headers, |
| 267 | "body": body, |
| 268 | }); |
| 269 | self.call("auth.fetch", Some(params)).await |
| 270 | } |
| 271 | |
| 272 | /// Proxy an HTTP request through the plugin's custom fetch as a real-time stream. |
| 273 | pub async fn auth_fetch_stream( |