RetrieveHeaders is a procedure that allows the HTTP protocol handler to capture header values in an HTTP
Response, and to store the headers in the
Response for the protocol handler. RetrieveHeaders clears all headers in
Response prior to capturing new values. RetrieveHeaders repeatedly calls TIdHTTP.ReadLn until no more header data is available on the HTTP client connection, or an
EIdConnClosedGracefully is raised. If an exception is raised, the HTTP client connection is closed. When all headers have been read from the client, RetrieveHeaders calls Response.ProcessHeaders to move the rea headers to their corresponding properties.