GetHeader Method  

Return the value of the specified header field


object.GetHeader( HeaderField, HeaderValue )


A string that specifies the name of the header field to obtain the value for.
A string that will contain the value of the specified header field with 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 header field has not been defined, it will return False.


The GetHeader method is used get the value of a specified header field from the response header returned by the server. This method should only be called after the client has requested the resource. To enumerate all of the header fields returned by the server, use the GetFirstHeader and GetNextHeader methods.

See Also

HeaderField Property, HeaderValue Property, ClearHeaders Method, GetNextHeader Method, SetHeader Method