Returns last error message
Syntax
lastError()
Arguments
no arguments
Return value
string. text description of an error.
When the server returns an error, the message shows all data returned from the server, HTTP header and response body.
Example
$rconn = getRESTConn();
$result = $rconn->requestJson( "/resource", "GET" );
if( $result === false ) {
echo "Error occurred. Description: ";
echo $rconn->lastError();
} else {
echo "Request successfult. Result: ";
print_r( $result );
}