HTTP
The VBOX Touch supports requests via HTTP and HTTPS. This requires the user to enter the website domain and the request string they want. You also have to be connected to a WiFi network first. Currently there is only 1 supported request and that is GET which returns data from the website.
Connecting
The GET request is used to send a request to a website and receive a HTTP header string back. This may contain a json which would be automatically converted into a dictionary. Performing a GET request requires 2 stages. First you need to peer connect to the domain and then you need to GET from the subdirectory by sending a message.
network.connect('MY_WEBSITE', 'HTTP', 'example.com', 443, True)
Here ‘example.com’ is just an illustrative endpoint; replace it with the domain you wish to connect to. This example uses port 443 with TLS v1 (HTTPS).
Using GET
Once this has successfully peer connected you can GET from the subdirectory of the domain
network.get_connection_object_from_name('MY_WEBSITE').send_data('api/activity', 'keep-alive')
This will then send a GET request to try and GET information from the place you have requested and store the data in the processed_data list.