Use the System.RestRequest class to access and pass request data in a RESTful Apex method. An Apex RESTful Web service method is defined using one of the REST annotations. For more information about Apex RESTful Web service, see Exposing Apex Classes as REST Web Services.