module.request
Note
This document has been machine translated.
Sends a request to the service exposed by the module.
Parameters
- module (
string): The module name. - path (
string): The path of the service exposed by the module. - body (
any): The parameters passed to the service exposed by the module. The content is defined by the module's service.
Return Value
- json (
any): The response from the module's service.
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"
}