31#ifndef PROTOCORE_HTTP_CLIENT_H
32#define PROTOCORE_HTTP_CLIENT_H
36#if PROTOCORE_ENABLE_HTTP_CLIENT
48 HTTP_CLIENT_ERR_URL = -1,
49 HTTP_CLIENT_ERR_DNS = -2,
51 HTTP_CLIENT_ERR_CONNECT = -3,
52 HTTP_CLIENT_ERR_TIMEOUT = -4,
53 HTTP_CLIENT_ERR_SEND = -5,
54 HTTP_CLIENT_ERR_RESPONSE = -6,
55 HTTP_CLIENT_ERR_TLS = -7,
79 const char *content_type;
120 HttpTargetArgs target;
121 HttpRequestArgs request;
122 HttpMessageArgs message;
132extern HttpClientVars HttpClientV;
137 void (*
const parse_target_uri)(uint8_t *work);
138 void (*
const build_request)(uint8_t *work);
139 void (*
const parse_response)(uint8_t *work);
140 void (*
const get)(uint8_t *work);
141 void (*
const post)(uint8_t *work);
146void protocore_http_client_parse_target_uri(uint8_t *work);
147void protocore_http_client_build_request(uint8_t *work);
148void protocore_http_client_parse_response(uint8_t *work);
149void protocore_http_client_get(uint8_t *work);
150void protocore_http_client_post(uint8_t *work);
156static const HttpClientNs HttpClient __attribute__((unused)) = {
157 .parse_target_uri = protocore_http_client_parse_target_uri,
158 .build_request = protocore_http_client_build_request,
159 .parse_response = protocore_http_client_parse_response,
160 .get = protocore_http_client_get,
161 .post = protocore_http_client_post,
177uint8_t *protocore_http_client_span(
void);
PROTO_ENUM_PACKED
Application protocol spoken on a listener port or connection slot.
#define PROTOCORE_BEGIN_DECLS
Give a header's declarations C linkage, so their symbol names carry no parameter types.
_Bool proto_bool
The truth value.
#define PROTOCORE_END_DECLS