HTTP & JSON
httpGet
$httpGet[]
$httpGet sends a synchronous HTTP GET request to the provided URL. The function blocks the command execution until a response is received or the request times out. Custom headers can be added before the call using $httpAddHeader. After the request completees, the raw response body is stored internally and can be accessed via $httpResult. Use $httpStatus to check the HTTP status code of the response.
Syntax
bdfd
$httpGet[url]
The URL must be a fully qualified URL including the scheme (https:// or http://). For best results with JSON APIs, use $httpResult with dot or bracket notation to extract specific fields from the parsed JSON response.
Examples
Fetch GitHub Repository Info
$httpGet[https://api.github.com/repos/ketsuna-org/bot-creator]
$title[GitHub Repository Info]
$description[Status: **$httpStatus**\nRaw response preview: `$httpResult`]
$color[#00BCD4]
$sendMessage[]