MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / http_request_json

Function http_request_json

packages/server/src/main/http.rs:1–9  ·  view source on GitHub ↗
(
    server_url: &str,
    method: &str,
    path: &str,
    body: Option<&Value>,
)

Source from the content-addressed store, hash-verified

1fn http_request_json(
2 server_url: &str,
3 method: &str,
4 path: &str,
5 body: Option<&Value>,
6) -> anyhow::Result<Value> {
7 let body = http_request(server_url, method, path, body)?;
8 serde_json::from_slice(&body).context("parse SimDeck service JSON response")
9}
10
11fn http_request(
12 server_url: &str,

Callers 6

http_get_jsonFunction · 0.85
service_get_jsonFunction · 0.85
service_post_sampleFunction · 0.85
service_actionFunction · 0.85
service_post_okFunction · 0.85

Calls 1

http_requestFunction · 0.85

Tested by

no test coverage detected