Skip to main content
The Fetch Web Request command (Command Type: 24) sends a web request using the browser’s fetch API from within the browser context.

Command Type

Command Type ID: 24

Parameters

ParameterTypeDescriptionRequired
urlstringThe URL of the web requestYes
timeoutnumberTimeout in millisecondsYes
bodyobject or stringRequest body for POST/PUT requestsNo
headersobject or ArrayHeaders to include with the requestNo
methodstringHTTP method (e.g., "GET", "POST"). Defaults to "GET"No

Usage Examples

Simple GET Request

{
  "command": "fetch-web-request",
  "params": {
    "url": "https://api.example.com/data",
    "timeout": 10000
  }
}

POST Request with JSON Body

{
  "command": "fetch-web-request",
  "params": {
    "url": "https://api.example.com/submit",
    "timeout": 15000,
    "method": "POST",
    "headers": { "Content-Type": "application/json" },
    "body": { "query": "live_data" }
  }
}