Topic Path: Pending > TIdNNTP.GetHeader@TStream
ContentsIndexHome
PreviousUpNext
TIdNNTP.GetHeader@TStream

Retrieves the headers for an NNTP article.

Parameters 
Description 
AMsg 
Stream where the article headers should be stored. 

Boolean - True on success, False on protocol or server error.

GetHeader is an overloaded Boolean function in TIdNNTP used to retrieve message headers for an NNTP article. GetHeader calls SendCmd using the NNTP HEAD command to retrieve message headers. 

AMsg is a TStream instance where the headers for the NNTP article should be stored. The NNTP current article pointer must be set proper to calling GetHeader. 

When a TStream descendant is used as the destination, GetHeader calls Capture using AMsg as an argument. 

The return value for GetHeader is True when the numeric response from SendCmd is 221. GetBody will return False if any of the following responses are received: 

 

Code 
Meaning 
412 
no newsgroup has been selected 
420 
no current article has been selected 
423 
no such article number in this group 
430 
no such article found 

 

Use SelectGroup to select the active newsgroup before prior to calling GetHeader. 

Use SelectArticle to set the current article pointer for the active newsgroup. 

Use GetNewNewsList to get a list of articles added since a specified date and time. 

Use GetBody to retrieve the body lines for a specific NNTP article. Use GetArticle to retrieve the entire contents of a specific NNTP article. 

Use XHDR to get specific header values for one or more NNTP articles. 

Use XOVER to get information from the overview database for one or more NNTP articles.

TIdMessage SelectGroup SelectArticle GetNewNewsList GetHeader GetBody GetArticle XOVER

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