Skip to main content

command

Function command 

Source
pub async fn command(
    requester: &ProductOSRequestClient,
    uri: Uri,
    verify_key: Vec<u8>,
    module: &str,
    instruction: &str,
    data: Option<Value>,
) -> Result<ProductOSResponse<BodyBytes>, ProductOSRequestError>
Expand description

Execute a command on a remote node.

Sends a command to the specified node URL with authentication.

§Arguments

  • requester - HTTP client for making the request
  • uri - Target node URI
  • verify_key - Authentication key
  • module - Module name
  • instruction - Instruction/command name
  • data - Optional JSON data payload

§Errors

Returns an error if the request fails or authentication is rejected.