Zephyr API Documentation 4.5.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches

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.

Detailed Description

HTTP request context.

Field Documentation

◆ content_type_value

const char* http_client_request::content_type_value

The value of the Content-Type header field, may be NULL.

◆ header_fields

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.

◆ headers_cb

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.

◆ headers_count

size_t http_client_request::headers_count

Number of headers provided in http_client_request::header_fields.

◆ method

enum http_method http_client_request::method

The HTTP method: GET, HEAD, OPTIONS, POST, ...

◆ payload

const uint8_t* http_client_request::payload

Payload, may be NULL.

◆ payload_cb

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.

◆ payload_len

size_t http_client_request::payload_len

Length of the payload provided in http_client_request::payload.

◆ response_cb

http_client_response_cb_t http_client_request::response_cb

User supplied callback function to call when response is received.

◆ skip_response_headers

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.

◆ url

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.


The documentation for this struct was generated from the following file: