GetFirstHeader Method  

Return the first response header field name and value.


object.GetFirstHeader( HeaderField, HeaderValue )


A string that will contain the name of the first header field returned by the server.
A string that will contain the value of the specified header field when the method returns. This parameter must be passed by reference.

Return Value

This method returns a Boolean value. If the method succeeds, it will return True. If the method fails, it will return False.


The GetFirstHeader method is used get the first header field name and value from the response header returned by the server. This method should only be called after the client has requested the resource. This method is typically used in conjunction with the GetNextHeader method to enumerate all of the response header fields returned by the server.

See Also

HeaderField Property, HeaderValue Property, GetNextHeader Method, SetHeader Method