Group: HTTP Functions (WinHTTP) - Library: winhttp
Custom HttpRequest class (WinHTTP)
HINTERNET WinHttpOpenRequest(
HINTERNET hConnect,
LPCWSTR pwszVerb,
LPCWSTR pwszObjectName,
LPCWSTR pwszVersion,
LPCWSTR pwszReferrer,
LPCWSTR* ppwszAcceptTypes,
DWORD dwFlags
);
DECLARE INTEGER WinHttpOpenRequest IN winhttp;
INTEGER hConnect,;
STRING pwszVerb,;
STRING pwszObjName,;
STRING pwszVersion,;
INTEGER pwszReferrer,;
INTEGER ppwszAcceptTypes,;
INTEGER dwFlags
hConnect [in] HINTERNET connection handle to an HTTP session returned by WinHttpConnect.
pwszVerb [in] Pointer to a string that contains the HTTP verb to use in the request.
pwszObjectName [in] Pointer to a string that contains the name of the target resource of the specified HTTP verb.
pwszVersion [in] Pointer to a string that contains the HTTP version. If this parameter is NULL, the function uses HTTP/1.1.
pwszReferrer [in] Pointer to a string that specifies the URL of the document from which the URL in the request pwszObjectName was obtained.
ppwszAcceptTypes [in] Pointer to a null-terminated array of string pointers that specifies media types accepted by the client.
dwFlags [in] Unsigned long integer value that contains the Internet flag values.
Returns a valid HTTP request handle if successful, or NULL if not.
MSDN: After the calling application finishes using the HINTERNET handle returned by WinHttpOpenRequest, it must be closed using the WinHttpCloseHandle function.