Skip to content

Commit

Permalink
feat(andax/fns/tsunagu): get_json(url)
Browse files Browse the repository at this point in the history
  • Loading branch information
madonuko committed Feb 17, 2025
1 parent 9490de2 commit ef9b945
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion andax/fns/tsunagu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pub mod ar {
});

#[rhai_fn(return_raw, global)]
fn get_json(ctx: NativeCallContext, url: &str) -> Res<Dynamic> {
pub fn get_json(ctx: NativeCallContext, url: &str) -> Res<Dynamic> {
let resp = AGENT.get(url).header("User-Agent", USER_AGENT).call().ehdl(&ctx)?;
resp.into_body().read_json().ehdl(&ctx)
}
Expand Down

0 comments on commit ef9b945

Please # to comment.