InternetSetHeaders
- set custom HTTP headers for subsequent web requests

File Input/Output functions
(AmiBroker 6.40)


SYNTAX InternetSetHeaders( "headers" )
RETURNS NOTHING
FUNCTION Set custom HTTP headers for subsequent web requests (via subsequent InternetOpenURL or InternetPostRequest calls)

Note that InternetPostRequest will automatically add "Content-Type: application/x-www-form-urlencoded" header unless user specifies their own Content-Type in the InternetSetHeaders call

EXAMPLE // For example to enable GZIP compression you need to use:

INTERNET_OPTION_HTTP_DECODING = 65;
InternetSetOption( INTERNET_OPTION_HTTP_DECODING, 1 );

InternetSetHeaders("Accept-Encoding: gzip, deflate");
SEE ALSO InternetOpenURL() function

References:

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

More information:

See updated/extended version on-line.