This interface consists of the methods explained below and is included in the interfaces IF_HTTP_RESPONSE and IF_HTTP_REQUEST. For the attributes of the interface, see the section after the methods.
The interface IF_HTTP_ENTITY is used as a basis for the interfaces IF_HTTP_RESPONSE and IF_HTTP_REQUEST. IF_HTTP_REQUEST and IF_HTTP_RESPONSE extend IF_HTTP_ENTITY by adding request and response-specific methods.
Also, the interface IF_HTTP_ENTITY is used as an interface for multipart segments, both in multipart requests and multipart responses.
The access options using the methods listed below are described in the sections on developing a HTTP request handler.
· Accessing HTTP Multipart Data
The methods listed in the table are supported by the interface IF_HTTP_ENTITY. These methods are also supported by the interfaces IF_HTTP_REQUEST and IF_HTTP_RESPONSE. Therefore, in this section, the term ‘HTTP entity’ signifies a HTTP request, a HTTP response, or a multipart segment, depending on the purpose for which the method is used.
Method Name |
Use and Meaning |
GET_HEADER_FIELD |
Returns the value of the specified (pseudo) HTTP header field (name is case-insensitive). |
GET_HEADER_FIELDS |
Returns a table of all (pseudo) HTTP header fields as name/value pairs. |
DELETE_HEADER_FIELD |
Deletes the given header field from the list of header fields. |
DELETE_HEADER_FIELD_SECURE |
Deletes the header field from the list of header fields |
SET_COMPRESSION |
Activate/deactivate compression |
SET_HEADER_FIELD |
Sets the specified (pseudo) header fields to the given value (name is case-insensitive). |
SET_HEADER_FIELDS |
Sets all (pseudo) HTTP header fields in the request object to the values specified as arguments in the name/value table. |
You can find details about the access types as well as a list of the SAP-specific header fields in Accessing Header Fields.
Method Name |
Use and Meaning |
GET_FORM_FIELD |
Returns the value of the specified HTML form field (name is case-insensitive). |
GET_FORM_FIELD_CS |
Gets the value of the requested form fields |
GET_FORM_FIELDS |
Returns a table of all name/value pairs from the HTML form fields. |
GET_FORM_FIELDS_CS |
Gets a list of all form fields (case-sensitive) |
DELETE_FORM_FIELD |
Deletes the given form field. |
DELETE_FORM_FIELD_SECURE |
Deletes the form field from the list of form fields |
SET_FORM_FIELD |
Sets the specified HTML form field to the given value (name is case-insensitive). |
SET_FORM_FIELDS |
Sets all HTML form fields in the request object to the given values. |
For details, see Accessing Form Fields.
Method Name |
Use and Meaning |
ADD_COOKIE_FIELD |
Sets the given sub-field of the given cookie. |
GET_COOKIE_FIELD |
Returns the given sub-field of the given cookie. |
GET_COOKIE |
Returns the value of the specified cookie (name is case-insensitive). |
GET_COOKIES |
Returns a list of all cookies. |
DELETE_COOKIE |
Deletes the given cookie from the list of cookies. |
DELETE_COOKIE_SECURE |
Deletes the cookie from the list of cookies |
SET_COOKIE |
Sets the value of the specified cookie (name is case-insensitive). |
For details, see Accessing Cookies.
Method Name |
Use and Meaning |
APPEND_CDATA |
Inserts the given character string into the body of the HTTP entity. |
APPEND_CDATA2 |
Inserts the given character string into the body of the HTTP entity. |
APPEND_DATA |
Inserts the given binary string into the body of the HTTP entity. |
FROM_XSTRING |
Instantiates the HTTP entity using the given XSTRING. |
GET_CDATA |
Returns the data in the body of the HTTP entity as a character string. |
GET_DATA |
Returns the data in the body of the HTTP entity as a binary string. |
SET_CDATA |
Inserts the content of the body of the HTTP entity into the given character string. |
SET_DATA |
Inserts the content of the body of the HTTP entity into the given binary string. |
TO_XSTRING |
Reverse function of FROM_XSTRING: Changes an HTTP entity into an XSTRING. |
GET_LAST_ERROR |
Returns the last error code. |
For details, see Accessing HTTP Body Data.
The following methods are only valid for HTTP multipart units!
Method Name |
Use and Meaning |
ADD_MULTIPART |
Adds a multipart segment to the body of the HTTP entity. |
GET_MULTIPART |
Returns the multipart segment specified by an index. |
NUM_MULTIPARTS |
Returns the number of multipart segments in the request object. |
For details, see Accessing HTTP Multipart Data.