Skip to content

$jsonRequest

$jsonRequest will send a GET request to a given URL.

Usage

$jsonRequest[URL;property?;error?;...header?]

Parameters

FieldTypeDescriptionRequired
URLstringURL you want to get/send data to/fromtrue
property?stringProperty to return (get method)false
error?stringError to return when request failsfalse
…headerstringHeader.false

Example(s)

This will return a random dog fact:

1
client.command({
2
name: "jsonRequest",
3
code: `
4
$jsonRequest[https://some-random-api.ml/facts/dog;fact;Something went wrong.]
5
`
6
});