http AddHeaders property
Return to Introduction  Previous page  Next page
Applies to
auHTTP component.  

Declaration
property AddHeaders: TStringList;  

Description

The AddHeaders property specifies any additional HTTP headers that should pass to the server. You can specify ANY optional headers that may be required by server to process request.  
 
For example, if server can return preferable content taking in account the language that user can read:  
AddHeadeers.Clear;  
{ Assume that user user can read Russian, English, German and French content (sorted by priority). }  
AddHeaders.Add('ACCEPT_LANGUAGE: ru,en,de,fr');  
 
iiinfo List of widely used HTTP headers (* sample values marked red):  
ACCEPT_CHARSET: iso-8859-1,*,utf-8  
ACCEPT_ENCODING: gzip, deflate  
ACCEPT_LANGUAGE: en-us,es  
CONNECTION: Keep-Alive  
FROM: someone@somewhere.com  
IF_MODIFIED_SINCE: Tue, 06 Feb 2001 18:30:50 GMT  
RANGE: bytes=0-255  
…see also quick reference to HTTP headers at http://www.cs.tut.fi/~jkorpela/http.html, or full reference at http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html  
 
tip If you would like to test the HTTP headers specified in your HTTP client on real server, you can read content from following URL:http://www.appcontrols.com/cgi/test/http_headers.cgi  

See also
AcceptTypes, Agent properties.  
File not found.