
IF_HTTP_ENTITY
Definition
This interface does not contain any attributes. It consists of the methods explained below and is contained in the interfaces
IF_HTTP_RESPONSE and IF_HTTP_REQUEST.Use
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.See the sections listed below for descriptions of the various access methods:
Accessing Header Fields Accessing Form Fields Accessing Cookies Accessing HTTP Body Data Accessing HTTP Multipart DataStructure
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.Accessing Header Fields
|
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. |
|
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.Accessing Form Fields
|
Method Name |
Use and Meaning |
|
GET_FORM_FIELD |
Returns the value of the specified HTML form field (name is case-insensitive). |
|
GET_FORM_FIELDS |
Returns a table of all name/value pairs from the HTML form fields. |
|
DELETE_FORM_FIELD |
Deletes the given form field. |
|
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.Accessing Cookies
|
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. |
|
SET_COOKIE |
Sets the value of the specified cookie (name is case-insensitive). |
For details, see
Accessing Cookies.Accessing HTTP Body Data
|
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 |
Opposite of FROM_XSTRING. Changes a HTTP entity into an XSTRING. |
|
GET_LAST_ERROR |
Returns the last error code. |
For details, see
Accessing HTTP Body Data.Accessing HTTP Multipart 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.