Hi,
Complex (aka body) parameters are supported only by POST, PUT, PATCH methods.
You can use Header/Query/Path parameters like
[ROServiceMethod]
[ROHttpAPIMethod('st', 'GET')]
function method_get(
[ROHttpAPIQueryParameter]
a:Integer;
[ROHttpAPIQueryParameter]
b:Integer): Integer; virtual;
curl -v -X GET “http://localhost:8099/api/st?a=3&b=4” -H “accept: application/json”
Note: Unnecessary use of -X or --request, GET is already inferred.
* Trying ::1:8099...
* Trying 127.0.0.1:8099...
* Connected to localhost (127.0.0.1) port 8099 (#0)
> GET /api/st?a=3&b=4 HTTP/1.1
> Host: localhost:8099
> User-Agent: curl/7.72.0
> accept: application/json
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Content-Type: application/json; charset=utf-8
< Accept-Encoding: gzip, identity
< Connection: keep-alive
< Content-Length: 1
<
7
* Connection #0 to host localhost left intact
[ROServiceMethod]
[ROHttpAPIMethod('sum/{a}/{b}', 'GET')]
function method_get2(
a:Integer;
b:Integer): Integer; virtual;
curl -v -X GET “http://localhost:8099/api/sum/1/2” -H “accept: application/json”
Note: Unnecessary use of -X or --request, GET is already inferred.
* Trying ::1:8099...
* Trying 127.0.0.1:8099...
* Connected to localhost (127.0.0.1) port 8099 (#0)
> GET /api/sum/1/2 HTTP/1.1
> Host: localhost:8099
> User-Agent: curl/7.72.0
> accept: application/json
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Content-Type: application/json; charset=utf-8
< Accept-Encoding: gzip, identity
< Connection: keep-alive
< Content-Length: 1
<
3
* Connection #0 to host localhost left intact
[ROServiceMethod]
[ROHttpAPIMethod('sum2', 'GET')]
function method_get3(
[ROHttpAPIHeaderParameter]
a:Integer;
[ROHttpAPIHeaderParameter]
b:Integer): Integer; virtual;
curl -v -X GET “http://localhost:8099/api/sum2” -H “accept: application/json” -H “X-a: 4” -H “X-b: 2”
Note: Unnecessary use of -X or --request, GET is already inferred.
* Trying ::1:8099...
* Trying 127.0.0.1:8099...
* Connected to localhost (127.0.0.1) port 8099 (#0)
> GET /api/sum2 HTTP/1.1
> Host: localhost:8099
> User-Agent: curl/7.72.0
> accept: application/json
> X-a: 4
> X-b: 2
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Content-Type: application/json; charset=utf-8
< Accept-Encoding: gzip, identity
< Connection: keep-alive
< Content-Length: 1
<
6
* Connection #0 to host localhost left intact