CWinHttpRequest.GetAllResponseHeadersmethod
Gets all HTTP response headers.
Syntax
FUNCTION GetAllResponseHeaders () AS DWSTRING
Return value
The resulting header information.
Description
Gets all HTTP response headers.
Remarks
This method returns all of the headers contained in the most recent server response. The individual headers are delimited by a carriage return and line feed combination (ASCII 13 and 10). The last entry is followed by two delimiters (13, 10, 13, 10). Invoke this method only after the Send method has been called.
Example
#cmdline "-s console" #include once "AfxNova/CWinHttpRequest.inc" using AfxNova
' // Create an instance of the CWinHttp class DIM pWHttp AS CWinHttpRequest
' // Open an HTTP connection to an HTTP resource pWHttp.Open "GET", "http://microsoft.com"
' // Send an HTTP request to the HTTP server pWHttp.Send
' // Wait for response with a timeout of 5 seconds DIM iSucceeded AS LONG = pWHttp.WaitForResponse(5)
' // Get the response headers DIM dwsResponseHeaders AS DWSTRING = pWHttp.GetAllResponseHeaders PRINT dwsResponseHeaders
Reference
- Defined in AfxNova/CWinHttpRequest.inc:256
- Documented in COM/CWinHttpRequest Class.md
- Topic: CWinHttpRequest Class