Piecewise

Build chat bots with blocks

(method) URL (url) send (datatype) data (data) with headers (headers) parse response as (response)

In Internet

Jump to block

Fetch an Internet URL with these options. Errors return an empty table and print a warning.

Parameters

Parameter name Parameter type Required? Description
method any The method to use when fetching the provided URL. GET and HEAD requests cannot have bodies (this will throw an error).
url String The URL to fetch.
datatype any The data type to use when sending the request. JSON and XML are only supported for POST and PUT requests.
data table The data to send with the request.
headers table The headers to send with the request.
response any Specify how to parse the resulting response.

Output

Array, String, table