HttpSendRequestExA function

Sends the specified request to the HTTP server.

Note  Callers that need to send extra data beyond what is normally passed to HttpSendRequestEx can do so by calling HttpSendRequest instead.
 

Syntax

BOOLAPI HttpSendRequestExA(
  HINTERNET           hRequest,
  LPINTERNET_BUFFERSA lpBuffersIn,
  LPINTERNET_BUFFERSA lpBuffersOut,
  DWORD               dwFlags,
  DWORD_PTR           dwContext
);

Parameters

hRequest

A handle returned by a call to the HttpOpenRequest function.

lpBuffersIn

Optional. A pointer to an INTERNET_BUFFERS structure.

lpBuffersOut

Reserved. Must be NULL.

dwFlags

Reserved. Must be zero.

dwContext

Application-defined context value, if a status callback function has been registered.

Return Value

If the function succeeds, the function returns TRUE.

If the function fails, it returns FALSE. To get extended error information, call GetLastError.

Remarks

HttpSendRequestEx performs both the send and the receive for the response. This does not allow the application to send any extra data beyond the single buffer that was passed to HttpSendRequestEx. Callers that need to send extra data beyond what is normally passed to HttpSendRequestEx can do so by calling HttpSendRequest instead. After the call to HttpSendRequestEx, send the remaining data by calling InternetWriteFile. Finally, follow up with a call to HttpEndRequest.

Note  The HttpSendRequestExA function represents data to send as ISO-8859-1 characters not ANSI characters. The HttpSendRequestExW function represents data to send as ISO-8859-1 characters converted to UTF-16LE characters. As a result, it is never safe to use the HttpSendRequestExW function when the headers to be added can contain non-ASCII characters. Instead, an application can use the MultiByteToWideChar and WideCharToMultiByte functions with a Codepage parameter set to 28591 to map between ANSI characters and UTF-16LE characters.
 
Note  WinINet does not support server implementations. In addition, it should not be used from a service. For server implementations or services use Microsoft Windows HTTP Services (WinHTTP).
 

Requirements

   
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header wininet.h
Library Wininet.lib
DLL Wininet.dll

See Also

HTTP Sessions

WinINet Functions