tfHttpcUserRegisterResponseHeader
Table of Contents >> Application Reference >> Web Client
#include <trsocket.h> |
int tfHttpcUserRegisterResponseHeader | ( |
ttHttpcUserConHandle conHandle, | |
ttHttpUserHeaderType headerType, | |
int flags | |
); |
Function Description
Tell the HTTP client to save the specified type of HTTP header it receives in the connection entry, so that it can be retrieved later by calling tfHttpcUserGetResponseHeaders(). This API can be called more than once to register multiple headers. Specify a headerType of TM_HTTP_HEADER_ALL to save all known headers. This API can be called anytime after the connection is open and before it is closed. Refer to RFC 2616 (HTTP 1.1) for a specification of the request and response header fields.
Parameters
- conHandle
- HTTP client connection handle
- headerType
- HTTP header type is one of the following (see ttHttpUserHeaderType in trsocket.h):
- TM_HTTP_HEADER_ALL
- TM_HTTP_HEADER_ALLOW
- TM_HTTP_HEADER_AUTH_INFO
- TM_HTTP_HEADER_AUTHORIZATION
- TM_HTTP_HEADER_CONNECTION
- TM_HTTP_HEADER_CONTENT_ENCODING
- TM_HTTP_HEADER_CONTENT_LENGTH
- TM_HTTP_HEADER_CONTENT_RANGE
- TM_HTTP_HEADER_CONTENT_TYPE
- TM_HTTP_HEADER_COOKIE
- TM_HTTP_HEADER_COOKIE2
- TM_HTTP_HEADER_DATE
- TM_HTTP_HEADER_EXPIRES
- TM_HTTP_HEADER_FROM
- TM_HTTP_HEADER_HOST
- TM_HTTP_HEADER_IF_MODIFIED_SINCE
- TM_HTTP_HEADER_LAST_MODIFIED
- TM_HTTP_HEADER_LOCATION
- TM_HTTP_HEADER_PRAGMA
- TM_HTTP_HEADER_RANGE
- TM_HTTP_HEADER_REFERER
- TM_HTTP_HEADER_SERVER
- TM_HTTP_HEADER_SET_COOKIE
- TM_HTTP_HEADER_TRANSFER_ENCODING
- TM_HTTP_HEADER_USER_AGENT
- TM_HTTP_HEADER_WWW_AUTHENTICATE
- TM_HTTP_HEADER_RETRY_AFTER
- TM_HTTP_HEADER_IF_NONE_MATCH
- TM_HTTP_HEADER_ETAG
- TM_HTTP_HEADER_IF_MATCH
- TM_HTTP_HEADER_X_FRAME_OPTIONS
- TM_HTTP_HEADER_X_XSS_PROTECTION
- TM_HTTP_HEADER_X_CONTENT_TYPE_OPTIONS
- TM_HTTP_HEADER_STRICT_TRANSPORT_SECURITY
- flags
- Currently unused.
Returns
- TM_ENOERROR
- Successful
- TM_EINVAL
- Invalid parameter(s)