Topic Path: Symbol Reference > Classes > TIdTCPConnection Class > TIdTCPConnection Methods > WriteHeader Method
TIdTCPConnection.WriteHeader Method

Sends the RFC protocol header values in a list to the connection.

procedure WriteHeader(
    AHeader: TIdStrings
List of header names and values o write to the connection. 

WriteHeader is a procedure used to write the items in AHeader to the connection using the common format for RFC headers in an RFC-compliant message. 

AHeader is a TIdStrings instance containing items in NAME=VALUE format. WriteHeader will translate each line in AHeader to the RFC-compliant header format NAME: VALUE. 

WriteHeader calls the WriteLn method in IOHandler to send the values on the connection to the peer. WriteHeader also sends a single blank line after all values in AHeaders to indicate the end of RFC message headers. 

Use WriteRFCStrings to write the contents of a TStrings instance that follows the rules for RFC message bodies. 

Any blank lines in AHeader are also sent to the peer connection, and could interfere with RFC-compliant protocols where blank lines in RFC headers are used to indicate the end of header values.

Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.