Network

HTTP Request

HTTP requests are executed by the robot-side proxy. Can be used to access HTTP services on the network where the robot control box is located.

Example Program

req = {method = "GET", url = "http://127.0.0.1:8080/", headers = {}, body = ""}
res = lebai:http(req)
print(res.status)
JSON-RPC
// Request:
{ "jsonrpc": "2.0", "method": "http", "params": [{"method": "GET", "url": "http://127.0.0.1:8080/", "headers": {}, "body": ""}], "id": 1 }
// Response:
{ "jsonrpc": "2.0", "result": {"status": 200, "headers": {}, "body": ""}, "id": 1 }