Skip to content

Latest commit

 

History

History
210 lines (151 loc) · 6.96 KB

nf-http-httpreceiverequestentitybody.md

File metadata and controls

210 lines (151 loc) · 6.96 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:http.HttpReceiveRequestEntityBody
HttpReceiveRequestEntityBody function (http.h)
Receives additional entity body data for a specified HTTP request.
HTTP_RECEIVE_REQUEST_ENTITY_BODY_FLAG_FILL_BUFFER
HttpReceiveRequestEntityBody
HttpReceiveRequestEntityBody function [HTTP]
_http_httpreceiverequestentitybody
http.httpreceiverequestentitybody
http/HttpReceiveRequestEntityBody
http\httpreceiverequestentitybody.htm
http
b4ba765f-537b-4021-9ecc-d400d9b94723
12/05/2018
HTTP_RECEIVE_REQUEST_ENTITY_BODY_FLAG_FILL_BUFFER, HttpReceiveRequestEntityBody, HttpReceiveRequestEntityBody function [HTTP], _http_httpreceiverequestentitybody, http.httpreceiverequestentitybody, http/HttpReceiveRequestEntityBody
http.h
Windows
Windows Vista, Windows XP with SP2 [desktop apps only]
Windows Server 2003 [desktop apps only]
Httpapi.lib
Httpapi.dll
Windows
19H1
HttpReceiveRequestEntityBody
http/HttpReceiveRequestEntityBody
c++
APIRef
kbSyntax
DllExport
Httpapi.dll
HttpReceiveRequestEntityBody

HttpReceiveRequestEntityBody function

-description

The HttpReceiveRequestEntityBody function receives additional entity body data for a specified HTTP request.

-parameters

-param RequestQueueHandle [in]

The handle to the request queue from which to retrieve the specified entity body data. A request queue is created and its handle returned by a call to the HttpCreateRequestQueue function.

Windows Server 2003 with SP1 and Windows XP with SP2:  The handle to the request queue is created by the HttpCreateHttpHandle function.

-param RequestId [in]

The identifier of the HTTP request that contains the retrieved entity body. This value is returned in the RequestId member of the HTTP_REQUEST structure by a call to the HttpReceiveHttpRequest function. This value cannot be HTTP_NULL_ID.

-param Flags [in]

This parameter can be the following flag value.

Windows Server 2003 with SP1 and Windows XP with SP2:  This parameter is reserved and must be zero.

Value Meaning
HTTP_RECEIVE_REQUEST_ENTITY_BODY_FLAG_FILL_BUFFER
Specifies that the buffer will be filled with one or more entity bodies, unless there are no remaining entity bodies to copy.

-param EntityBuffer [out]

A pointer to a buffer that receives entity-body data.

-param EntityBufferLength [in]

The size, in bytes, of the buffer pointed to by the pBuffer parameter.

-param BytesReturned [out, optional]

Optional. A pointer to a variables that receives the size, in bytes, of the entity body data returned in the pBuffer buffer.

When making an asynchronous call using pOverlapped, set pBytesReceived to NULL. Otherwise, when pOverlapped is set to NULL, pBytesReceived must contain a valid memory address, and not be set to NULL.

-param Overlapped [in, optional]

For asynchronous calls, set pOverlapped to point to an OVERLAPPED structure; for synchronous calls, set it to NULL.

A synchronous call blocks until the entity-body data has been retrieved, whereas an asynchronous call immediately returns ERROR_IO_PENDING and the calling application then uses GetOverlappedResult or I/O completion ports to determine when the operation is completed. For more information about using OVERLAPPED structures for synchronization, see Synchronization and Overlapped Input and Output.

-returns

If the function succeeds, the return value is NO_ERROR.

If the function is used asynchronously, a return value of ERROR_IO_PENDING indicates that the next request is not yet ready and is retrieved later through normal overlapped I/O completion mechanisms.

If the function fails, the return value is one of the following error codes.

Value Meaning
ERROR_INVALID_PARAMETER
One or more of the supplied parameters are in an unusable form.
ERROR_HANDLE_EOF
The specified entity body has already been completely retrieved; in this case, the value pointed to by pBytesReceived is not meaningful, and pBuffer should not be examined.
ERROR_DLL_INIT_FAILED
The calling application did not call HttpInitialize before calling this function.
Other
A system error code defined in WinError.h.

-remarks

To retrieve an entire entity body, an application is expected to call HttpReceiveRequestEntityBody, passing in new buffers, until the function returns ERROR_HANDLE_EOF. As long as a buffer full of entity-body data is copied successfully and there is still more entity-body data waiting to be retrieved, the function returns NO_ERROR.

-see-also

HTTP Server API Version 1.0 Functions

HTTP Server Sample Application

HTTP_REQUEST

HttpReceiveHttpRequest

HttpSendHttpResponse

HttpSendResponseEntityBody