libfetch 0.0.0
A lightweight asynchronous HTTP/1.1 client library implementing a subset of the WHATWG Fetch API.
Loading...
Searching...
No Matches
fetch_response Struct Reference

HTTP response object. More...

#include <fetch.h>

Data Fields

uint16_t status
 
const char * status_text
 
bool ok
 
bool redirected
 
const char * url
 
fetch_headers_theaders
 
void * body
 
size_t body_size
 
fetch_body_type_t body_type
 
fetch_error_t error
 
const char * error_message
 

Detailed Description

HTTP response object.

Contains the complete response including status, headers, and body.

Note
Memory: Caller owns the response and must call fetch_response_free()

Field Documentation

◆ body

void* fetch_response::body

Response body data

◆ body_size

size_t fetch_response::body_size

Size of response body

◆ body_type

fetch_body_type_t fetch_response::body_type

Type of response body

◆ error

fetch_error_t fetch_response::error

Error code if request failed

◆ error_message

const char* fetch_response::error_message

Error message if request failed

◆ headers

fetch_headers_t* fetch_response::headers

Response headers (owned by response)

◆ ok

bool fetch_response::ok

True if status is 200-299

◆ redirected

bool fetch_response::redirected

True if response was redirected

◆ status

uint16_t fetch_response::status

HTTP status code

◆ status_text

const char* fetch_response::status_text

HTTP status message

◆ url

const char* fetch_response::url

Final URL after redirects


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