TuyaOS
|
#include <httpc.h>
成员变量 | |
bool_t | chunked |
const char * | content_encoding |
unsigned int | content_length |
const char * | content_type |
bool_t | keep_alive_ack |
int | keep_alive_max |
int | keep_alive_timeout |
const char * | location |
time_t | modify_time |
const char * | p_accept_ranges |
const char * | protocol |
const char * | reason_phrase |
const char * | server |
int | status_code |
http_ver_t | version |
Structure used to give back http header response fields to the caller.
bool_t http_resp_t::chunked |
This will be 'true' if "Transfer-Encoding" field is set to "chunked". Note that this is only for information and the API http_read_content() transparently handles chunked reads.
const char* http_resp_t::content_encoding |
The value of "Content-Encoding" header field e.g. "gzip"
unsigned int http_resp_t::content_length |
Value of the "Content-Length" field. If "Transfer-Encoding" is set to chunked then this value will be zero.
const char* http_resp_t::content_type |
The value of "Content-Type" header field. e.g. "text/html"
bool_t http_resp_t::keep_alive_ack |
If "Keep-Alive" field is present or if the value of "Connection" field is "Keep-Alive" then this member is set to 'true'. It is set to 'false' in other cases
int http_resp_t::keep_alive_max |
If "Keep-Alive" field is present in the response, this member contains the value of the "max" sub-field of this field. The max parameter indicates the maximum number of requests that a client will make, or that a server will allow to be made on the persistent connection.
int http_resp_t::keep_alive_timeout |
If "Keep-Alive" field is present in the response, this member contains the value of the "timeout" sub-field of this field. This is the time the server will allow an idle connection to remain open before it is closed.
const char* http_resp_t::location |
HTTP "Location" header field value
time_t http_resp_t::modify_time |
Last-Modified header field value in POSIX time format
const char* http_resp_t::p_accept_ranges |
Accept-Ranges
const char* http_resp_t::protocol |
The value of the protocol field in the first line of the HTTP header response. e.g. "HTTP".
const char* http_resp_t::reason_phrase |
The ASCII string present in the first line of HTTP response. It is the verbose representation of status code. e.g. "OK" if status_code is 200
const char* http_resp_t::server |
HTTP "Server" header field value
int http_resp_t::status_code |
The status code returned as a part of the first line of the HTTP response e.g. 200 if success
http_ver_t http_resp_t::version |
HTTP version