Show TOC

Background documentationREST Request and Response Locate this document in the navigation structure

 

The incoming and outgoing HTTP payload (URI including query parameters, header fields, and the HTTP content) can be accessed through three classes:

The REQUEST and RESPONSE classes implement several interfaces which reflect the various parts of an HTTP request and response. These classes can be used on the server side as well as on the client side.

IF_REST_MESSAGE

The IF_REST_MESSAGE interface defines methods for accessing HTTP header field information, as well as the REST entity through which the HTTP content can be obtained and changed.

IF_REST_REQUEST

Defines methods for accessing data from the HTTP request URI and the HTTP method.

IF_REST_RESPONSE

Provides methods for accessing data from the HTTP response, especially for setting response header fields, ETAG information for conditional handling (see Conditional Handling) and the returned HTTP status code.

CL_REST_REQUEST

Implements the interfaces IF_REST_MESSAGE and IF_REST_REQUEST to allow easy access to all required HTTP request data. An instance of CL_REST_REQUEST is always usable for subclasses of the CL_REST_RESOURCE handler and its attribute MO_REQUEST.

CL_REST_RESPONSE

Implements the interfaces IF_REST_MESSAGE and IF_REST_RESPONSE to allow easy access to the HTTP response data. An instance of CL_REST_RESPONSE is always usable for subclasses of CL_REST_RESOURCE handler and its attribute MO_RESPONSE.