fluentci_shared/
http.rs

1use crate::state::State;
2use extism::{convert::Json, *};
3use fluentci_common::http::http as common_http;
4
5host_fn!(pub http(user_data: State; url: String) -> Json<File> {
6  let state = user_data.get()?;
7  let state = state.lock().unwrap();
8  let graph = state.graph.clone();
9  let file = common_http(graph, url, true)?;
10    Ok(Json(file))
11});