function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Lukesh KarmoreLukesh Karmore 

what it return in rest class

what it return 
map<string,object> params=(map<string,object>)Json.deseriliazeUntype(request.requestBody.toString);
here (request.requestBody.toString); is used for

thank you
SwethaSwetha (Salesforce Developers) 
HI Lukesh,
If the Apex method has no parameters, then Apex REST copies the HTTP request body into the RestRequest.requestBody property.

If there are parameters, then Apex REST attempts to deserialize the data into those parameters and the data won't be deserialized into the RestRequest.requestBody property.

I recommend reviewing the elaborate information provided by sfdcfox on https://salesforce.stackexchange.com/questions/15578/restrequest-requestbody-instead-of-params regarding this

Related: https://salesforce.stackexchange.com/questions/137599/restcontext-request-requestbody-encoding-decoding-5d

​​​​​​​Hope this helps you. Please mark this answer as best so that others facing the same issue will find this information useful. Thank you