Products Downloads


French version


 

The methods allow to control the functioning of the XMLHTTPRequest object instantiated by the web browser.

 

Directions assigned to method parameters:

(I)

Input

(O)

Output

List of return codes for the various methods

_XHR_ERR_OK Method run successfully.
_XHR_ERR_UNEXPECTED_ERROR Unexpected error occurred.
_XHR_ERR_INVALID_PARAMETER Invalid parameter.
_XHR_ERR_TRUNCATED_DATA Output variable data is truncated.
_XHR_ERR_INVALID_STATE Request call failed as the request state was invalid.

 

 

Allows to cancel the request execution. The execution of the request must be in progress.

Syntax

CALL_METHOD ObjectName ABORT ReturnCode

Parameters

ReturnCode(O)

NUM_BIN_2

Return code for the method.

 

 

Allows to add data to a form.

Syntax

CALL_METHOD ObjectName APPEND_FORM_DATA Key Value ReturnCode

Parameters

Key(I)

ALPHA(n)

Name of the data part.

Value(I)

ALPHA(n)

Data.

ReturnCode(O)

NUM_BIN_2

Return code for the method.

 

 

Allows to reinitialise the data of the form associated to the request.

 

Note: The form data is kept after the execution. To reinitialise the form, you must clear it explicitly.

Syntax

CALL_METHOD ObjectName CLEAR_FORM_DATA ReturnCode

Parameters

ReturnCode(O)

NUM_BIN_2

Return code for the method.

 

 

Allows to read the value of all the HTTP headers of the request. The request must be in a state allowing to read headers (_XHR_READY_STATE_HEADERS_RECEIVED or later state).

Syntax

CALL_METHOD ObjectName GET_ALL_RESPONSE_HEADERS Value ReturnCode

Parameters

Value(O)

ALPHA(n)

Headers value.

ReturnCode(O)

NUM_BIN_2

Return code for the method.

 

 

Allows to read the value of the request HTTP header. The request must be in a state allowing to read headers (_XHR_READY_STATE_HEADERS_RECEIVED or later state).

Syntax

CALL_METHOD ObjectName GET_RESPONSE_HEADER Name Value ReturnCode

Parameters

Name(I)

ALPHA(n)

Header name.

Value(O)

ALPHA(n)

Header value.

ReturnCode(O)

NUM_BIN_2

Return code for the method.

 

 

Allows to open the request. The request must be unsent (_XHR_READY_STATE_UNSENT) or done (_XHR_READY_STATE_DONE). If the request is opened successfully, its state changes to opened ( _XHR_READY_STATE_OPENED).

Syntax

CALL_METHOD ObjectName OPEN Method Url Async User Password ReturnCode

Parameters

Method(I)

ALPHA(n)

Method of querying (POST or GET),

Url(I)

ALPHA(n)

Access URL,

Async(I)

BOOL

Asynchronous execution,

User(I)

ALPHA(n)

User name for http authentication or *BLANK,

Password(I)

ALPHA(n)

User password,

ReturnCode(O)

NUM_BIN_2

Return code for the method.

 

 

Allows to send the request and specify the body data of the associated message. The request must be open (the _XHR_READY_STATE_OPENED state).

Syntax

CALL_METHOD ObjectName SEND Message ReturnCode

Parameters

Message(I)

ALPHA(n)

Message body.

ReturnCode(O)

NUM_BIN_2

Return code for the method.

 

 

Allows to send the request and associate the form with the message body. The request must be open (the _XHR_READY_STATE_OPENED state). The form must have been composed using the APPEND_FORM_DATA and CLEAR_FORM_DATA methods.

 

Note: The form data is kept after the execution. To reinitialise the form, you must clear it explicitly.

 

Syntax

CALL_METHOD ObjectName SEND_FORM_DATA ReturnCode

Parameters

ReturnCode(O)

NUM_BIN_2

Return code for the method.

 

 

Allows to add an HTTP header for the request. The request must be open (the _XHR_READY_STATE_OPENED state).

Syntax

CALL_METHOD ObjectName SET_REQUEST_HEADER Name Value ReturnCode

Parameters

Name(I)

ALPHA(n)

Header name.

Value(I)

ALPHA(n)

Header value.

ReturnCode(O)

NUM_BIN_2

Return code for the method.

 

 

 

 

 

 

 

↑ Top of page