InternetSetOption
- set HTTP option for internet session

File Input/Output functions
(AmiBroker 6.40)


SYNTAX InternetSetOption( option, value )
RETURNS NOTHING
FUNCTION Set the option for Internet session. Available Internet options are listed in Windows SDK docs: https://docs.microsoft.com/en-us/windows/win32/wininet/option-flags
EXAMPLE // how to request and handle GZIP compressed HTTP

INTERNET_OPTION_HTTP_DECODING = 65;

InternetSetOption( INTERNET_OPTION_HTTP_DECODING, 1 );

InternetSetHeaders("Accept-Encoding: gzip, deflate");

ih = InternetOpenURL("http://www.amibroker.com/news.html" );

if( ih )
{
   while( ( text = InternetReadString( ih ) ) != "" )
   {
      printf( "%s", text );
   }

   InternetClose(ih);
}
SEE ALSO InternetOpenURL() function , InternetPostRequest() function

References:

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

More information:

See updated/extended version on-line.