...
POST http://localhost/smartWeb/api/rest/v0/d2/rpc/E.E.SmartWebApiTutorial/TestInOut
Blok kódu | ||||
---|---|---|---|---|
| ||||
[ { "type": "bool", "value": "vTrue", "returnAs": "boolParam" // the output value will be named boolParam }, 123, { "type": "real", "value": 10.9, "returnAs": "realParam", // the output value will be named realParam "returnFields": ["ValueTime", "Status"] // attributes ValueTime and Status are required to the output value too }, { "type": "time", "returnAs": "timeParam" // the output value will be named timeParam }, "hello D2000" ] |
...
The output of the RCP calling is in the JSON object which has attributes according to the required names of output parameters:
Blok kódu | ||||
---|---|---|---|---|
| ||||
{ "realParam": { "type": "real", "value": 5.45, "status": [ "Valid" ], "valueTime": 1498213794522 }, "boolParam": { "type": "bool", "value": "vFalse" }, "timeParam": { "type": "time", "value": 1498213794012 } } |
...