Network
Check the internet connection, download web pages, post to web services and send UDP messages.
Where to find it: the Network category of the toolbox, in any script editor set to Blockly or on Top bar → Workspaces → Blockly
Blocks

| Block | What it does |
|---|---|
| The internet is available | True when this computer can reach the internet. |
| Download … waiting up to … ms | Fetch a web address (HTTP GET) and return what the server sends back, such as a web page or JSON. |
| Post to … data … waiting up to … ms | Send data to a web address (HTTP POST) and return what the server sends back. |
| Post to … data … waiting up to … ms header names … header values … | Send data to a web address (HTTP POST) with request headers, such as a content type or an API key, and return what the server sends back. |
| Send UDP bytes … to … port … | Send a UDP packet of bytes (numbers 0 to 255) to a computer on the network. |
Details
The internet is available

True when this computer can reach the internet.
In JavaScript: this block gives back the value of
Net.isInternetAvailable()
Download … waiting up to … ms

Fetch a web address (HTTP GET) and return what the server sends back, such as a web page or JSON.
In JavaScript: this block gives back the value of
Net.HTTPGet('https://synthiam.com', 2000)
Post to … data … waiting up to … ms

Send data to a web address (HTTP POST) and return what the server sends back.
In JavaScript: this block gives back the value of
Net.HTTPPost('https://synthiam.com', 'name=robot', 2000)
Post to … data … waiting up to … ms header names … header values …

Send data to a web address (HTTP POST) with request headers, such as a content type or an API key, and return what the server sends back. The two lists pair up: the first name with the first value.
In JavaScript: this block gives back the value of
Net.HTTPPost('https://synthiam.com', '{"name":"robot"}', 2000, ["Content-Type"], ["application/json"])
Send UDP bytes … to … port …

Send a UDP packet of bytes (numbers 0 to 255) to a computer on the network.
In JavaScript: this block runs
Net.sendUDP('192.168.1.10', 5000, [72, 105]);