CWinHttpRequest.GetResponseHeadermethod
Gets the specified HTTP response header.
Syntax
FUNCTION GetResponseHeader (BYREF wszHeader AS WSTRING) AS DWSTRING
Parameters
| Name | Description | |
|---|---|---|
wszHeader | The case-insensitive header name. |
Return value
The resulting header information.
Description
Gets the specified HTTP response header.
Remarks
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 dwsResponseHeader AS DWSTRING = pWHttp.GetResponseHeader("Date") PRINT dwsResponseHeader
Reference
- Defined in AfxNova/CWinHttpRequest.inc:235
- Documented in COM/CWinHttpRequest Class.md
- Topic: CWinHttpRequest Class