InternetGetStatusCode
- returns HTTP status code of last Internet call

File Input/Output functions
(AmiBroker 6.40)


SYNTAX InternetGetStatusCode
RETURNS NUMBER
FUNCTION The function returns HTTP status code of last InternetOpenURL or InternetPostRequest call.

HTTP status codes are listed here: https://en.wikipedia.org/wiki/List_of_HTTP_status_codes

EXAMPLE // NON existing page (should result in status code 404)
ih = InternetOpenUrl("http://www.amibroker.com/index3434.html" );

if( ih )
{
   printf("HTTP status code: %g", InternetGetStatusCode( ih ) );

   InternetClose( ih );
}
else
{
   printf("Internet connection can not be open because: %s", GetLastOSError() );
}
SEE ALSO InternetOpenURL() function , InternetPostRequest() function

References:

The InternetGetStatusCode function is used in the following formulas in AFL on-line library:

More information:

See updated/extended version on-line.