MCPcopy Index your code
hub / github.com/ChrisFeldmeier/OpenCodeRust / auth_fetch

Method auth_fetch

crates/opencode-plugin/src/subprocess/client.rs:256–270  ·  view source on GitHub ↗

Proxy an HTTP request through the plugin's custom fetch.

(
        &self,
        url: &str,
        method: &str,
        headers: &std::collections::HashMap<String, String>,
        body: Option<&str>,
    )

Source from the content-addressed store, hash-verified

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(

Callers 1

fetch_proxyMethod · 0.80

Calls 1

callMethod · 0.80

Tested by

no test coverage detected