Entering content frameObject documentation IF_HTTP_RESPONSE and IF_HTTP_REQUEST Locate the document in its SAP Library structure

Definition

Interfaces IF_HTTP_RESPONSE and IF_HTTP_REQUEST can be reached by an HTTP request handler using attribute RESPONSE or REQUEST of the interface IF_HTTP_SERVER. They are used to work with the data of the HTTP request or the HTTP response.

Use

These interfaces can be used in both server and client roles. They allow easy access to data, and have functions for modifying both HTTP header data and HTTP body data. This interface is intended for both roles of HTTP server and client, and therefore has both requesting and manipulating methods.

Both types of method enhance the interface IF_HTTP_ENTITY and provide additional methods.

 

Structure

List of Methods

IF_HTTP_RESPONSE

The following methods enhance the interface IF_HTTP_ENTITY and are implemented in the class CL_HTTP_RESPONSE.

GET_STATUS

Gets the currently set HTTP status code

SET_STATUS

Sets the given HTTP status code

DELETE_COOKIE_AT_CLIENT

Deletes the given cookie on the client side

REDIRECT

Executes a redirect to the given URL

SERVER_CACHE_EXPIRE_ABS

Sets the expiry period for the ICM server cache (see also Structure linkICM Server Cache). An absolute date and time are given. The page contained in the cache is invalid after this date and time.

SERVER_CACHE_EXPIRE_DEFAULT

Activates the ICM server cache and sets the default expiry period.

SERVER_CACHE_EXPIRE_REL

Sets a relative expiration period (in seconds) for the ICM server cache

SERVER_CACHE_BROWSER_DEPENDENT

Sets the indicator for browser-specific HTML in the ICM server cache. The request is only taken from the cache if the request comes from the correct browser type.

IF_HTTP_REQUEST

The following methods enhance the interface IF_HTTP_ENTITY and are implemented in the class CL_HTTP_REQUEST.

GET_AUTHORIZATION

Provides information from the authorization header field

SET_AUTHORIZATION

Sets the authorization header field for the request

GET_FORM_DATA

Puts form data into a complex data structure

GET_RAW_MESSAGE

Provides the complete HTTP message

GET_URI_PARAMETER

Provides the value of the required URI parameters

GET_USER_AGENT

Provides user agent information from the request

 

 

 

Leaving content frame