MCPcopy Index your code
hub / github.com/aiscriptdev/aiscript / make_request

Function make_request

aiscript-vm/src/stdlib/http.rs:113–128  ·  view source on GitHub ↗
(
    method: reqwest::Method,
    url: &str,
    headers: HeaderMap,
    body: Option<String>,
)

Source from the content-addressed store, hash-verified

111}
112
113async fn make_request(
114 method: reqwest::Method,
115 url: &str,
116 headers: HeaderMap,
117 body: Option<String>,
118) -> Result<reqwest::Response, reqwest::Error> {
119 let client = reqwest::Client::new();
120 let mut request = client.request(method, url);
121 request = request.headers(headers);
122
123 if let Some(body) = body {
124 request = request.body(body);
125 }
126
127 request.send().await
128}
129
130fn http_get<'gc>(
131 ctx: &mut crate::vm::State<'gc>,

Callers 6

http_getFunction · 0.85
http_postFunction · 0.85
http_putFunction · 0.85
http_deleteFunction · 0.85
http_patchFunction · 0.85
http_headFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected