-
My goal is: Call remote Json-RPC server
hardware: ESP32-PICO-KIT
mos version: 20190522-131204/2.14.0-g71e2991 -
My actions are:
RPC.call(“http://192.168.2.16/test.php”, ‘Config.Save’, {a: 1, b: 2}, function (resp, ud) {
print(‘Response:’, JSON.stringify(resp));
}, null);
library list:
- origin: https://github.com/mongoose-os-libs/boards
- origin: https://github.com/mongoose-os-libs/http-server
- origin: https://github.com/mongoose-os-libs/rpc-service-config
- origin: https://github.com/mongoose-os-libs/rpc-service-fs
- origin: https://github.com/mongoose-os-libs/rpc-service-gpio
- origin: https://github.com/mongoose-os-libs/rpc-service-ota
- origin: https://github.com/mongoose-os-libs/rpc-uart
- origin: https://github.com/mongoose-os-libs/rpc-ws
- origin: https://github.com/mongoose-os-libs/rpc-loopback
- origin: https://github.com/mongoose-os-libs/mjs
-
The result I see is:
[Jun 29 21:41:34.986] mg_rpc.c:225 Unsupported connection scheme in http://192.168.2.16/test.php -
My expectation & question is: Is it possible to use HTTP transport to make outgoing RPC call? My second question is: I have found a lot of links with examples, which used HTTP object from api_http.js But I have not found this library. So, is it possible to make POST/GET query from mjs?