20#include <zephyr/kernel.h>
21#include <zephyr/net/http/client.h>
22#include <zephyr/net/http/parser.h>
29#define REST_CLIENT_SEC_TAG_NO_SEC -1
32#define REST_CLIENT_TLS_DEFAULT_PEER_VERIFY -1
35#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:38
@ REST_CLIENT_HTTP_STATUS_UNAUTH
Definition: rest_client.h:44
@ REST_CLIENT_HTTP_STATUS_OK
Definition: rest_client.h:40
@ REST_CLIENT_HTTP_STATUS_NOT_FOUND
Definition: rest_client.h:48
@ REST_CLIENT_HTTP_STATUS_BAD_REQ
Definition: rest_client.h:42
@ REST_CLIENT_HTTP_STATUS_FORBIDDEN
Definition: rest_client.h:46
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:75
size_t body_len
Definition: rest_client.h:95
int tls_peer_verify
Definition: rest_client.h:72
const char * host
Definition: rest_client.h:78
bool keep_alive
Definition: rest_client.h:64
const char ** header_fields
Definition: rest_client.h:89
uint16_t port
Definition: rest_client.h:81
size_t resp_buff_len
Definition: rest_client.h:109
const char * body
Definition: rest_client.h:92
char * resp_buff
Definition: rest_client.h:106
int connect_socket
Definition: rest_client.h:61
int32_t timeout_ms
Definition: rest_client.h:103
const char * url
Definition: rest_client.h:84
int sec_tag
Definition: rest_client.h:67
REST client request context.
Definition: rest_client.h:57
int used_socket_is_alive
Definition: rest_client.h:143
uint16_t http_status_code
Definition: rest_client.h:129
char http_status_code_str[HTTP_STATUS_STR_SIZE]
Definition: rest_client.h:135
size_t response_len
Definition: rest_client.h:123
char * response
Definition: rest_client.h:126
size_t total_response_len
Definition: rest_client.h:120
int used_socket_id
Definition: rest_client.h:140
REST client response context.
Definition: rest_client.h:118