getHttpStatusCode() method

Returns the HTTP status if it is set.

Syntax

public int getHttpStatusCode ()

Parameters

Returns

The HTTP status code, if available.

Remarks

If the HTTP status is not set, the default value is -1.

Example 1

RequestStateElement element; int code =element.getHttpStatusCode();