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

HTTP response context. More...

#include <zephyr/net/http/client_multiprotocol.h>

Data Fields

uint16_t status_code
 HTTP status code, 0 until the response headers are received.
int error
 Reason for an aborted transaction (negative errno), 0 otherwise.
char content_type [HTTP_CLIENT_MAX_CONTENT_TYPE_LEN]
 Content type, truncated to fit.
char content_encoding [HTTP_CLIENT_MAX_CONTENT_TYPE_LEN]
 Content encoding, truncated to fit.
size_t content_len
 Content length, valid when content_len_present is set.
bool content_len_present
 Whether the response carried a Content-Length header.
const struct http_client_header * headers
 Headers of the header block being reported.
size_t header_count
 Length of headers array.
const uint8_t * body
 Pointer to body data.
size_t body_len
 Body length (in current chunk).

Detailed Description

HTTP response context.

Field Documentation

◆ body

const uint8_t* http_client_response::body

Pointer to body data.

◆ body_len

size_t http_client_response::body_len

Body length (in current chunk).

◆ content_encoding

char http_client_response::content_encoding[HTTP_CLIENT_MAX_CONTENT_TYPE_LEN]

Content encoding, truncated to fit.

Empty if not available.

◆ content_len

size_t http_client_response::content_len

Content length, valid when content_len_present is set.

◆ content_len_present

bool http_client_response::content_len_present

Whether the response carried a Content-Length header.

◆ content_type

char http_client_response::content_type[HTTP_CLIENT_MAX_CONTENT_TYPE_LEN]

Content type, truncated to fit.

Empty if not available.

◆ error

int http_client_response::error

Reason for an aborted transaction (negative errno), 0 otherwise.

◆ header_count

size_t http_client_response::header_count

Length of headers array.

◆ headers

const struct http_client_header* http_client_response::headers

Headers of the header block being reported.

Set only in the callback reporting that block; NULL in body data callbacks, or when skip_response_headers was set in the request.

◆ status_code

uint16_t http_client_response::status_code

HTTP status code, 0 until the response headers are received.


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