pub async fn SendRequest(
SideCarIdentifier: &str,
Method: String,
Parameters: Value,
TimeoutMilliseconds: u64,
) -> Result<Value, VineError>Expand description
Sends a request to a sidecar and waits for a response.
This is the primary method for request-response communication with sidecars. It implements timeout handling and automatic connection validation.
§Parameters
SideCarIdentifier: Unique identifier of the target sidecarMethod: RPC method name to callParameters: JSON parameters for the RPC callTimeoutMilliseconds: Maximum time to wait for response (default: 5000ms)
§Returns
Ok(Value): JSON response from the sidecarErr(VineError): Request failed or timed out
§Example
use serde_json::json;
let result =
SendRequest("cocoon-main".to_string(), "GetExtensions".to_string(), json!({}), 5000)
.await?;