I have converted existing RODL based server to code first server and added HTTPApi support to it.
I have written a service method as follows :
[ROServiceMethod]
[ROCustom('HttpApiPath','rolePlayers')]
[ROCustom('HttpApiMethod','POST')]
[ROCustom('HttpApiResult','201')]
function GetRolePlayer_HTTP(const CallInfo: stCallInfo): boolean;
stCallInfo is a class inherited from TROComplexType . I have some business requirements where CallInfo can be nil.
Calling /api/rolePlayers with below JSON in body provides the expected result :
{
“CallInfo”: {
“ClientDateTime”: “2014-01-01T23:28:56.782Z”,
“SessionID”: 388803,
“ShortDateFormat”: “dd/MM/yyyy”,
“ShortTimeFormat”: “hh:mm”,
“UserID”: 110
}
}
but when I set “CallInfo” to empty JSON object , this is not working
Postman shows ‘Invalid Path’.
Please correct me if I am missing anything.