
Interaction Model
In this section, the data and control flows for the client role are described using an illustration similar to that in section
Interaktionsmodell.
When an ABAP application program in the SAP System sends a HTTP request to the Internet, the steps shown in the illustration are taken (see also the explanatory notes under the illustration).

- An object in the class
CL_HTTP_CLIENT is created. This object is referred to here as the client control block (similarly to the server control block). The structure is described under Interface IF_HTTP_CLIENT.
To do this, the method
CL_HTTP_CLIENT=>CREATE and/or CL_HTTP_CLIENT=>CREATE_BY_DESTINATION is called. The ABAP application program that sends the request calls the method.

Note that the activities in points 2, 3, 5, 7, 8 and 9 must also be triggered by the ABAP application program, that is, by calling the appropriate methods. The ABAP application program, therefore, uses the components of the class
CL_HTTP_CLIENT so that it can process the request and response data.
- If you want to call the method
CL_HTTP_CLIENT=>CREATE, the following information must be available to the method: HOST (host name), SERVICE (port), PROXY_HOST (host name of the proxy host), PROXY_SERVICE (port of the proxy host) and SCHEME (specifies whether HTTP or HTTPS should be used; has the default value "SCHEMETYPE_HTTP").
If you want the method CL_HTTP_CLIENT=>CREATE_BY_DESTINATION to be called, you have to make the corresponding entries in transaction SM59 for the HTTP destination (node HTTP Connections to R/3 System or HTTP Connections to Ext.. Server). For details on the settings, see Connection Establishment Using Destination (SM59).
- Filling the client control block you have created:
the attribute
REQUEST is filled with the required request data.
The method SEND is called and the request is sent.
The connection is opened and the request is converted to a HTTP data stream (serialized).
The request is sent to the HTTP server in question via task handlers and the Internet Communication Manager.
If the HTTP server requires authentication (for example, if the server is also an SAP System), the client must log on at this point.
If the server is also an SAP System, the client logs on via an SAP logon popup. Otherwise, the client logs on via the HTTP standard popup. This query whether the SAP logon popup or the HTTP standard popup should be used is executed within the method RECEIVE (see 7).
This authentication is carried out in dialog processes, not in batch processes.
The HTTP server generates a response and sends it back.
The method RECEIVE is called and the response data is read in and the attribute RESPONSE of the control block is filled.
The data is processed or output by means of accessing the response attribute.
It is also possible to transfer the output to the HTML control. In this case, the response is displayed as it would be in a browser.
The method CLOSE is called and the connection is thus closed.

The following ABAP
Sample Program executes a HTTP request. The request is sent to the same SAP instance (as SAP Web Application Server can function as both server and client).