HttpSendRequestHttpSendRequest*
*



Contents  *



Index  *Topic Contents
*Previous Topic: HttpQueryInfo
*Next Topic: HttpSendRequestEx

HttpSendRequest

BOOL HttpSendRequest(
    IN HINTERNET hHttpRequest,
    IN LPCSTR lpszHeaders,
    IN DWORD dwHeadersLength,
    IN LPVOID lpOptional,
    DWORD dwOptionalLength
);

Sends the specified request to the HTTP server.

hHttpRequest
Open HTTP request handle returned by HttpOpenRequest.
lpszHeaders
Additional headers to be appended to the request. This parameter can be NULL if there are no additional headers to append.
dwHeadersLength
Length, in characters, of the additional headers. If this parameter is -1L and lpszHeaders is not NULL, the function assumes that lpszHeaders is zero-terminated (ASCIIZ), and the length is calculated.
lpOptional
Address of any optional data to send immediately after the request headers. This parameter is generally used for POST and PUT operations. The optional data can be the resource or information being posted to the server. This parameter can be NULL if there is no optional data to send.
dwOptionalLength
Length, in bytes, of the optional data. This parameter can be zero if there is no optional data to send.

HttpSendRequest sends the specified request to the HTTP server and allows the client to specify additional headers to send along with the request.

The function also lets the client specify optional data to send to the HTTP server immediately following the request headers. This feature is generally used for "write" operations such as PUT and POST.

After the request is sent, the status code and response headers from the HTTP server are read. These headers are maintained internally and are available to client applications through the HttpQueryInfo function.

An application can use the same HTTP request handle in multiple calls to HttpSendRequest, but the application must read all data returned from the previous call before calling the function again.

See also InternetReadFile


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.