Show TOC

MethodsLocate this document in the navigation structure

Use

Interface IF_HTTP_CLIENT contains the following methods:

Note

The methods are identical to a certain extent with those in the server role.

ESCAPE_HTML

Use the method from IF_HTTP_UTILITY.

ESCAPE_URL

Use the method from IF_HTTP_UTILITY.

UNESCAPE_URL

Use the method from IF_HTTP_UTILITY.

AUTHENTICATE

Authenticates the HTTP server.

If an SAP system is being used, this method allows authentication on the SAP logon screen. User, password, client, and language must be entered.

Otherwise, authentication proceeds in accordance with the HTTP server in question.

APPEND_FIELD_URL

Appends the name/value pair to the query string of the URL

CREATE_ABS_URL

Creates an absolute URL

CREATE_REL_URL

Creates a relative URL

CLOSE

Closes the HTTP connection.

This method is called when the HTTP connection, that is, the control block, is no longer needed.

RECEIVE

Enters the response in the RESPONSE structure.

This method must be called for every HTTP request, so that the data received can be processed.

Note

The method cannit be reused while another database cursor is being used (in a

loop, for example SELECT/LOOP/EXEC SQL or before a FETCH order) since they can trigger implicit database commits

and thereby leads to closing the associated database cursor.

GET_LAST_ERROR

Gets the return code of the last method call

LISTEN

Only used if several requests must be sent at the same time. When a response arrives, this method is used to determine which request it corresponds to.

Method RECEIVE (see above) can then be called.

SEND

When the REQUEST attribute is filled with the request data, the HTTP request can be sent to the HTTP server, by calling the method SEND.

The method converts the data to a HTTP data stream and sends the data stream to the server.

The timeout for the waiting period for the response is communicated to the method in the form of seconds. The constants CO_TIMEOUT_DEFAULT and CO_TIMEOUT_INFINITE can also be used here.

Note

The method cannit be reused while another database cursor is being used (in a

loop, for example SELECT/LOOP/EXEC SQL or before a FETCH order) since they can trigger implicit database commits

and thereby leads to closing the associated database cursor.

REFRESH_COOKIE

Reset the cookie object (the object still exists, but has no content)

REFRESH_REQUEST

Reset the request object

REFRESH_RESPONSE

Reset the response object

SET_COMPRESSION

Activate/deactivate the compression. This uses constants CO_COMPRESS_BASED_ON_MIME_TYPE, CO_COMPRESS_IN_ALL_CASES and CO_COMPRESS_NONE.

Note

Compare the list of constants with the current list in transaction SE24.

More Information

For an example in which a number of these methods are used, see:

For detailed example programs, see: