CWinHttpRequest.Sendmethod
Sends an HTTP request to an HTTP server.
Syntax
FUNCTION Send (BYREF dvBody AS DVARIANT = "") AS HRESULT
Parameters
| Name | Description | |
|---|---|---|
dvBody | Optional. Data to be sent to the server. |
Description
Sends an HTTP request to an HTTP server.
Remarks
The request to be sent was defined in a prior call to the Open method. The calling application can provide data to be sent to the server through the cvBody parameter. If the HTTP verb of the object's Open is "GET", this method sends the request without dvBody, even if it is provided by the calling application.
Example
#include once "AfxNova/CWinHttpRequest.inc" USING AfxNova
' // Create an instance of the CWinHttpRequest 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)
Reference
- Defined in AfxNova/CWinHttpRequest.inc:201
- Documented in COM/CWinHttpRequest Class.md
- Topic: CWinHttpRequest Class