Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
http_client.h File Reference

HTTP client API. More...

#include <kernel.h>
#include <net/net_ip.h>
#include <net/http_parser.h>

Go to the source code of this file.

Data Structures

struct  http_response
 
struct  http_client_internal_data
 
struct  http_request
 

Macros

#define HTTP_CRLF   "\r\n"
 
#define HTTP_STATUS_STR_SIZE   32
 

Typedefs

typedef int(* http_payload_cb_t) (int sock, struct http_request *req, void *user_data)
 Callback used when data needs to be sent to the server. More...
 
typedef int(* http_header_cb_t) (int sock, struct http_request *req, void *user_data)
 Callback can be used if application wants to construct additional HTTP headers when the HTTP request is sent. Usage of this is optional. More...
 
typedef void(* http_response_cb_t) (struct http_response *rsp, enum http_final_call final_data, void *user_data)
 Callback used when data is received from the server. More...
 

Enumerations

enum  http_final_call { HTTP_DATA_MORE = 0 , HTTP_DATA_FINAL = 1 }
 

Functions

int http_client_req (int sock, struct http_request *req, int32_t timeout, void *user_data)
 Do a HTTP request. The callback is called when data is received from the HTTP server. The caller must have created a connection to the server before calling this function so connect() call must have be done successfully for the socket. More...
 

Detailed Description

HTTP client API.

An API for applications do HTTP requests