TuyaOS
成员变量
http_req_t结构体 参考

#include <httpc.h>

http_req_t 的协作图:
Collaboration graph
[图例]

成员变量

HTTP_HEAD_ADD_CB add_head_cb
 
VOID * add_head_data
 
const char * content
 
int content_len
 
unsigned int download_offset
 
unsigned int download_size
 
http_custom_content_ctx_sp_custom_content_ctx
 
unsigned char redirect_cnt
 
const char * resource
 
http_method_t type
 
http_ver_t version
 

详细描述

The HTTP Client's Request structure

The application should fill up this structure and pass it to the http_prepare_req() API while making an HTTP request. For HTTP POST, the fields content and content_len of this structure have to be set as well. More name-value fields can be added to HTTP header using http_add_header().

结构体成员变量说明

◆ content

const char* http_req_t::content

Pointer to data buffer. NULL if GET request

◆ content_len

int http_req_t::content_len

The length of the data pointed to by content above. This is don't-care if the content is set to NULL

◆ redirect_cnt

unsigned char http_req_t::redirect_cnt

initialzied redirect count, default is zero

◆ resource

const char* http_req_t::resource

The target resource for the HTTP Request. A complete URL is also accepted.

◆ type

http_method_t http_req_t::type

The Type of HTTP Request

◆ version

http_ver_t http_req_t::version

The HTTP Protocol Version


该结构体的文档由以下文件生成: