
Accessing HTTP Body Data
In some cases, a HTTP request handler may have to access the unprocessed data in the HTTP body. This may be the case if the content type is
"text/html" or "text/xml", and the HTTP body contains no form fields. Access is gained using the methods GET_CDATA() / GET_CDATA(). These methods also allow you to modify the request data, if necessary.This is described in
IF_HTTP_ENTITY.Whilst method
APPEND_CDATA2() always works with raw data, method APPEND_CDATA2() receives another parameter that contains data encoding. There are the constants CO_ENCODING_RAW, CO_ENCODING_URL, CO_ENCODING_HTML and CO_ENCODING_WML.The constants display how the text should be output. The text is usually output as it was entered (
CO_ENCODING_RAW). If, however, it occurs in a URL (for example, as a parameter), it must have a specific coding (for example, blank characters are replaces by '+' or '%20'). In this case, parameter CO_ENCODING_URL is used. If a text should appear on an HTML page as it was entered, characters that have a special semantic (such as '<' ) must be replaced by their html-encoded counterpart ( '<' ). (CO_ENCODING_HTML). The constants CO_ENCODING_WML are available for the WML coding for WML.This coding is mainly used in BSP pages by expressions such as '
<%html= mystring %>'. There are html, url and raw. The WML coding is executed if html is specified as coding, and the page then has the MIME type of a WML document.