httpclient.h 文件参考
#include <stdbool.h>
#include <stdint.h>

浏览源代码.

结构体

struct  httpclient_t
 This structure defines the httpclient_t structure
更多...
 
struct  httpclient_data_t
 This structure defines the HTTP data structure.
更多...
 

枚举

enum  HTTP_REQUEST_TYPE {
  HTTP_DELETE , HTTP_GET , HTTP_HEAD , HTTP_POST ,
  HTTP_PUT
}
 http requst type 更多...
 
enum  HTTPC_RESULT {
  HTTP_EAGAIN = 1 , HTTP_SUCCESS = 0 , HTTP_ENOBUFS = -1 , HTTP_EARG = -2 ,
  HTTP_ENOTSUPP = -3 , HTTP_EDNS = -4 , HTTP_ECONN = -5 , HTTP_ESEND = -6 ,
  HTTP_ECLSD = -7 , HTTP_ERECV = -8 , HTTP_EPARSE = -9 , HTTP_EPROTO = -10 ,
  HTTP_EUNKOWN = -11 , HTTP_ETIMEOUT = -12
}
 http error code 更多...
 

函数

HTTPC_RESULT httpclient_get (httpclient_t *client, const char *url, httpclient_data_t *client_data)
 
HTTPC_RESULT httpclient_head (httpclient_t *client, const char *url, httpclient_data_t *client_data)
 
HTTPC_RESULT httpclient_post (httpclient_t *client, const char *url, httpclient_data_t *client_data)
 
HTTPC_RESULT httpclient_put (httpclient_t *client, const char *url, httpclient_data_t *client_data)
 
HTTPC_RESULT httpclient_delete (httpclient_t *client, const char *url, httpclient_data_t *client_data)
 
HTTPC_RESULT httpclient_prepare (httpclient_data_t *client_data, int header_size, int resp_size)
 
HTTPC_RESULT httpclient_unprepare (httpclient_data_t *client_data)
 
void httpclient_reset (httpclient_data_t *client_data)
 
HTTPC_RESULT httpclient_conn (httpclient_t *client, const char *url)
 
HTTPC_RESULT httpclient_send (httpclient_t *client, const char *url, int method, httpclient_data_t *client_data)
 
HTTPC_RESULT httpclient_recv (httpclient_t *client, httpclient_data_t *client_data)
 
void httpclient_clse (httpclient_t *client)
 
void httpclient_set_custom_header (httpclient_t *client, char *header)
 
int httpclient_get_response_code (httpclient_t *client)
 
int httpclient_get_response_header_value (char *header_buf, char *name, int *val_pos, int *val_len)
 
int httpclient_formdata_addtext (httpclient_data_t *client_data, char *content_disposition, char *content_type, char *name, char *data, int data_len)
 
int httpclient_formdata_addfile (httpclient_data_t *client_data, char *content_disposition, char *name, char *content_type, char *file_path)
 

详细描述

http API header file.

版本
V1.0
日期
2019-12-24 Copyright (C) 2015-2020 Alibaba Group Holding Limited

在文件 httpclient.h 中定义.