|
The HTTPRESPONSE structure provides additional information about the
response to the client.
typedef struct _HTTPRESPONSE
{
DWORD dwSize;
DWORD dwFlags;
DWORD dwVersion;
DWORD dwReserved;
UINT nExpires;
UINT nResultCode;
LPCTSTR lpszReason;
LPCTSTR lpszMediaType;
} HTTPRESPONSE, *LPHTTPRESPONSE;
Members
- dwSize
- An unsigned integer value that specifies the size of the
structure.
- dwFlags
- An unsigned integer value that specifies one or more response
flags. This member is reserved for future use and should always
have a value of zero.
- dwVersion
- An unsigned integer value that specifies the protocol version
used. It may be one of the following values:
Constant |
Description |
HTTP_VERSION_DEFAULT (0) |
The server should respond to the client using the same
version specified in the request. |
HTTP_VERISON_10 (0x10000) |
The server should respond to the client using version 1.0 of
the protocol. |
HTTP_VERSION_11 (0x10001) |
The server should respond to the client using version 1.1 of
the protocol. |
- dwReserved
- An unsigned integer value that is reserved for future use.
- nExpires
- An integer value that specifies the number of seconds until the
client should consider any cached response data to be stale. If this
value is zero, the default cache expiration time for the server will
be used. The default cache expiration time is 7200 seconds (2 hours).
The value of this structure member is ignored if the HTTP_RESPONSE_NOCACHE
option is specified when the response is sent to the client.
- nResultCode
- An integer value that specifies the result code that should be
sent in response to the client request. The result code is a
three-digit number that indicates success or failure. For more
information, refer to the HttpGetCommandResult function.
- lpszReason
- A string that that describes the result code sent to the client.
The description should be brief and should not contain any
formatting characters or HTML markup. This parameter may be NULL, in
which case a default description of the result code will be used.
- lpszMediaType
- A string that specifies the Internet media type for the data
that is being sent to the client as defined in RFC 2046. The format
for the content type string consists of two parts, a primary and
secondary media type separated by a forward slash. Common examples
are "text/plain", "text/html" and
"application/octet-stream". If this member is NULL, the
library will attempt to automatically determine the appropriate
media type.
Remarks
This structure is used with the HttpSendResponse function
and the dwSize member must be initialized to size of the structure.
Failure to properly initialize the structure will cause the
function call to fail.
Requirements
Minimum Desktop Platform: Windows 7 (Service Pack 1)
Minimum Server Platform: Windows Server 2008 R2 (Service Pack 1)
Header File: cstools10.h
Unicode: Implemented as Unicode and ANSI versions.
See Also
HttpGetCommandResult,
HttpReceiveRequest,
HttpSendResponse,
HTTPREQUEST
|
|