module.request
Note
This document has been machine translated.
Issue a request to the service exposed by the module.
Parameters
- module:
string-- module name. - path:
string-- Path to the service the module exposes. - body:
any-- Parameters to pass to the service the module exposes. The content is defined by the module's service.
Return Values
- json:
any-- Response from the module's service.
Execution example
Request Data
{
"id": 1,
"jsonrpc": "2.0",
"method": "module.request",
"params": {
"module": "my-echo-module",
"path": "post",
"body": {
"key1": "test"
}
}
}
Request Execution
curl -H "Content-type: application/json" \
-H "APIKey: 9c6f4574-89d1-4e3c-8af7-2549dc217fcf" \
-H "Secret: aef8caingiej1ieNieJ3Phool4maeGohcies" \
-X POST -d "@request.json" \
https://localhost/api/v2/module/jsonrpc
Response
{
"result": {
"json": {
"key1": "test"
}
},
"id": 1,
"jsonrpc": "2.0"
}