|
Zephyr API Documentation 4.5.99
A Scalable Open Source RTOS
|
HTTP request context. More...
#include <zephyr/net/http/client_multiprotocol.h>
Data Fields | |
| enum http_method | method |
| The HTTP method: GET, HEAD, OPTIONS, POST, ... | |
| http_client_response_cb_t | response_cb |
| User supplied callback function to call when response is received. | |
| bool | skip_response_headers |
| Do not report response headers to the application. | |
| const char * | url |
| The request target in origin form, that is the path and query, for example /index.html, with no fragment. | |
| const char * | content_type_value |
| The value of the Content-Type header field, may be NULL. | |
| http_client_payload_cb_t | payload_cb |
| User supplied callback function to call when payload needs to be sent. | |
| const uint8_t * | payload |
| Payload, may be NULL. | |
| size_t | payload_len |
| Length of the payload provided in http_client_request::payload. | |
| http_client_headers_cb_t | headers_cb |
| User supplied callback function to call when optional headers need to be sent. | |
| const struct http_client_header * | header_fields |
| The HTTP header fields (application specific). | |
| size_t | headers_count |
| Number of headers provided in http_client_request::header_fields. | |
HTTP request context.
| const char* http_client_request::content_type_value |
The value of the Content-Type header field, may be NULL.
| const struct http_client_header* http_client_request::header_fields |
The HTTP header fields (application specific).
Should point to an array of application-specific HTTP headers. May include Content-Type header, but in such case http_client_request::content_type_value field should be NULL.
| http_client_headers_cb_t http_client_request::headers_cb |
User supplied callback function to call when optional headers need to be sent.
Its header fields follow the ones given in http_client_request::header_fields. May be NULL.
| size_t http_client_request::headers_count |
Number of headers provided in http_client_request::header_fields.
| enum http_method http_client_request::method |
The HTTP method: GET, HEAD, OPTIONS, POST, ...
| const uint8_t* http_client_request::payload |
Payload, may be NULL.
| http_client_payload_cb_t http_client_request::payload_cb |
User supplied callback function to call when payload needs to be sent.
This can be NULL in which case the http_client_request::payload field is used.
| size_t http_client_request::payload_len |
Length of the payload provided in http_client_request::payload.
| http_client_response_cb_t http_client_request::response_cb |
User supplied callback function to call when response is received.
| bool http_client_request::skip_response_headers |
Do not report response headers to the application.
The status code and the dedicated response fields are still filled in.
| const char* http_client_request::url |
The request target in origin form, that is the path and query, for example /index.html, with no fragment.
A missing leading slash is added. An OPTIONS request may target the server as a whole with "*". An absolute URL is rejected, and so is the CONNECT method.