27#include "ove_config.h"
63#ifdef CONFIG_OVE_NET_HTTP
118 const char *content_type,
const void *body,
size_t body_len,
136 const char *content_type,
const void *body,
size_t body_len,
147#ifdef OVE_HEAP_NET_HTTP
167#ifndef CONFIG_OVE_NET_HTTP
170} ove_http_client_storage_t;
174 ove_http_client_storage_t *storage)
203 const char *url,
const char *content_type,
const void *body,
216 const char *url,
const char *content_type,
const void *body,
void ove_http_client_deinit(ove_http_client_t client)
De-initialise an HTTP client.
ove_http_method_t
HTTP method.
Definition net_http.h:34
int ove_http_request(ove_http_client_t client, ove_http_method_t method, const char *url, const char *content_type, const void *body, size_t body_len, ove_http_response_t *resp)
Perform a generic HTTP request.
int ove_http_request_ex(ove_http_client_t client, ove_http_method_t method, const char *url, const char *content_type, const void *body, size_t body_len, const ove_http_header_t *headers, size_t header_count, ove_http_response_t *resp)
Perform an HTTP request with custom headers.
void ove_http_client_destroy(ove_http_client_t client)
Destroy a heap-allocated HTTP client.
int ove_http_get(ove_http_client_t client, const char *url, ove_http_response_t *resp)
Perform an HTTP GET request.
int ove_http_client_init(ove_http_client_t *client, ove_http_client_storage_t *storage)
Initialise an HTTP client from caller-supplied storage.
int ove_http_post(ove_http_client_t client, const char *url, const char *content_type, const void *body, size_t body_len, ove_http_response_t *resp)
Perform an HTTP POST request.
void ove_http_response_free(ove_http_response_t *resp)
Free resources in an HTTP response.
int ove_http_client_create(ove_http_client_t *client)
Heap-allocate and initialise an HTTP client.
@ OVE_HTTP_POST
Definition net_http.h:36
@ OVE_HTTP_DELETE
Definition net_http.h:38
@ OVE_HTTP_GET
Definition net_http.h:35
@ OVE_HTTP_PUT
Definition net_http.h:37
@ OVE_HTTP_PATCH
Definition net_http.h:39
struct ove_http_client * ove_http_client_t
Opaque handle for an HTTP client.
Definition types.h:256
@ OVE_ERR_NOT_SUPPORTED
Definition types.h:98
HTTP response (returned by request functions).
Definition net_http.h:53
int status
Definition net_http.h:54
size_t body_len
Definition net_http.h:56
char * body
Definition net_http.h:55
size_t headers_len
Definition net_http.h:58
char * headers
Definition net_http.h:57