(host: &str, port: u16, path: &str, method: &str)
| 2124 | } |
| 2125 | |
| 2126 | fn l7_jsonrpc_input(host: &str, port: u16, path: &str, method: &str) -> serde_json::Value { |
| 2127 | serde_json::json!({ |
| 2128 | "network": { "host": host, "port": port }, |
| 2129 | "exec": { |
| 2130 | "path": "/usr/bin/curl", |
| 2131 | "ancestors": [], |
| 2132 | "cmdline_paths": [] |
| 2133 | }, |
| 2134 | "request": { |
| 2135 | "method": "POST", |
| 2136 | "path": path, |
| 2137 | "query_params": {}, |
| 2138 | "jsonrpc": { |
| 2139 | "method": method |
| 2140 | } |
| 2141 | } |
| 2142 | }) |
| 2143 | } |
| 2144 | |
| 2145 | fn l7_jsonrpc_input_with_params( |
| 2146 | host: &str, |
no outgoing calls