20#include <zephyr/kernel.h>
21#include <zephyr/net/http/client.h>
22#include <zephyr/net/http/parser.h>
29#define REST_CLIENT_TLS_DEFAULT_PEER_VERIFY -1
32#define REST_CLIENT_SCKT_CONNECT -1
void rest_client_request_defaults_set(struct rest_client_req_context *req_ctx)
Sets the default values into a given request context.
rest_client_http_status
Common HTTP status codes.
Definition rest_client.h:35
@ REST_CLIENT_HTTP_STATUS_UNAUTH
Definition rest_client.h:41
@ REST_CLIENT_HTTP_STATUS_OK
Definition rest_client.h:37
@ REST_CLIENT_HTTP_STATUS_NOT_FOUND
Definition rest_client.h:45
@ REST_CLIENT_HTTP_STATUS_BAD_REQ
Definition rest_client.h:39
@ REST_CLIENT_HTTP_STATUS_FORBIDDEN
Definition rest_client.h:43
int rest_client_request(struct rest_client_req_context *req_ctx, struct rest_client_resp_context *resp_ctx)
REST client request.
enum http_method http_method
Definition rest_client.h:72
size_t body_len
Definition rest_client.h:92
int tls_peer_verify
Definition rest_client.h:69
const char * host
Definition rest_client.h:75
bool keep_alive
Definition rest_client.h:61
const char ** header_fields
Definition rest_client.h:86
uint16_t port
Definition rest_client.h:78
size_t resp_buff_len
Definition rest_client.h:106
const char * body
Definition rest_client.h:89
char * resp_buff
Definition rest_client.h:103
int connect_socket
Definition rest_client.h:58
int32_t timeout_ms
Definition rest_client.h:100
const char * url
Definition rest_client.h:81
int sec_tag
Definition rest_client.h:64
REST client request context.
Definition rest_client.h:54
int used_socket_is_alive
Definition rest_client.h:140
uint16_t http_status_code
Definition rest_client.h:126
char http_status_code_str[HTTP_STATUS_STR_SIZE]
Definition rest_client.h:132
size_t response_len
Definition rest_client.h:120
char * response
Definition rest_client.h:123
size_t total_response_len
Definition rest_client.h:117
int used_socket_id
Definition rest_client.h:137
struct rest_client_req_context * req_ctx
Definition rest_client.h:143
REST client response context.
Definition rest_client.h:115