You are not logged in.
Pages: 1
Hello,
I'm using published methods on the server and get a TSQLRestServerURIContext with the client request.
It's very easy to access parameters through the InputDouble[], ... but I cannot figure out how to access the body (which is JSON data) if the method is POST/PUT.
Is there a way to easily access this data (I wish to deserialize the body into a class) or should I unserialize manually?
Offline
Just use ServiceContext.Request.Call^.InBody property.
In fact, the TSQLRestServerURIContext.Call is a pointer to the low-level HTTP structure for input and output of the request.
Offline
Thanks a lot! I used this structure with a TDocVariantData.InitJSON and it works beautifully.
Offline
Pages: 1