cwist
Modern C web framework with libttak runtime
Loading...
Searching...
No Matches
cwist_http_request Struct Reference

#include <http.h>

Collaboration diagram for cwist_http_request:

Public Attributes

cwist_http_method_t method
 
cwist_sstring * path
 e.g., "/users/1"
 
cwist_sstring * query
 e.g., "active=true" (raw)
 
cwist_query_map * query_params
 Parsed query parameters.
 
cwist_query_map * path_params
 Parsed path parameters (e.g. :id)
 
cwist_sstring * version
 e.g., "HTTP/1.1"
 
cwist_http_header_node * headers
 
cwist_sstring * body
 
bool keep_alive
 
int client_fd
 
bool upgraded
 
uint32_t stream_id
 HTTP/2 or HTTP/3 stream ID (0 for HTTP/1.1).
 
void * private_data
 Internal framework use (protocol-specific context).
 
size_t content_length
 
bool te_chunked_seen
 Parser saw and validated Transfer-Encoding: chunked (HTTP/1.1).
 
bool expect_100_seen
 Parser saw and validated Expect: 100-continue (HTTP/1.1).
 
struct cwist_app * app
 Owning app context (if any).
 
cwist_db * db
 Shared database handle from cwist_app.
 
void * route_middleware_state
 Router middleware chain state (internal).
 
cwist_endpoint_opt_t endpoint_opts
 Behavior hints for the active endpoint.
 
cwist_query_map * flash
 Flash messages for this request (one-time read).
 
void * session
 cwist_session_t pointer set by session middleware.
 
char * csrf_token
 CSRF token populated by csrf middleware.
 
void * arena
 Per-request arena for bump-allocated structs (internal).
 
void * async_conn
 C1M connection shell when on the reactor path (internal).
 
bool ws_async_handoff
 WebSocket async path took fd ownership; C1M layer must detach.
 
void * https_conn
 HTTPS connection wrapper when on TLS path (internal).
 
void * h2_queue
 HTTP/2 async queue when on H2 path (internal).
 

Detailed Description

Definition at line 65 of file http.h.

Member Data Documentation

◆ app

struct cwist_app* cwist_http_request::app

Owning app context (if any).

Definition at line 176 of file http.h.

Referenced by cwist_app_dispatch(), cwist_app_http_handler(), cwist_app_http_handler_async(), cwist_async_defer(), and cwist_http_request_create().

◆ arena

void* cwist_http_request::arena

Per-request arena for bump-allocated structs (internal).

Definition at line 187 of file http.h.

Referenced by cwist_http2_push_resource(), cwist_http_request_create(), and cwist_http_request_destroy().

◆ async_conn

void* cwist_http_request::async_conn

C1M connection shell when on the reactor path (internal).

Definition at line 188 of file http.h.

Referenced by cwist_app_http_handler_async(), cwist_async_defer(), and cwist_http_request_create().

◆ body

◆ client_fd

◆ content_length

size_t cwist_http_request::content_length

◆ csrf_token

char* cwist_http_request::csrf_token

CSRF token populated by csrf middleware.

Definition at line 186 of file http.h.

Referenced by cwist_csrf_token(), and cwist_http_request_destroy().

◆ db

cwist_db* cwist_http_request::db

Shared database handle from cwist_app.

Definition at line 177 of file http.h.

Referenced by cwist_app_dispatch(), cwist_app_http_handler(), cwist_app_http_handler_async(), and cwist_http_request_create().

◆ endpoint_opts

cwist_endpoint_opt_t cwist_http_request::endpoint_opts

Behavior hints for the active endpoint.

Definition at line 183 of file http.h.

Referenced by cwist_http_request_create().

◆ expect_100_seen

bool cwist_http_request::expect_100_seen

Parser saw and validated Expect: 100-continue (HTTP/1.1).

Definition at line 174 of file http.h.

Referenced by cwist_http_receive_request(), and cwist_http_receive_request_nb().

◆ flash

cwist_query_map* cwist_http_request::flash

Flash messages for this request (one-time read).

Definition at line 184 of file http.h.

Referenced by cwist_flash_get(), cwist_flash_peek(), cwist_flash_pop_all_json(), cwist_flash_set(), cwist_http_request_create(), and cwist_http_request_destroy().

◆ h2_queue

void* cwist_http_request::h2_queue

HTTP/2 async queue when on H2 path (internal).

Definition at line 191 of file http.h.

Referenced by cwist_async_defer(), and cwist_http_request_create().

◆ headers

◆ https_conn

void* cwist_http_request::https_conn

HTTPS connection wrapper when on TLS path (internal).

Definition at line 190 of file http.h.

Referenced by cwist_async_defer(), cwist_http_request_create(), and cwist_https_receive_request().

◆ keep_alive

bool cwist_http_request::keep_alive

Definition at line 74 of file http.h.

Referenced by cwist_async_defer(), and cwist_http_request_create().

◆ method

◆ path

cwist_sstring * cwist_http_request::path

e.g., "/users/1"

Definition at line 67 of file http.h.

Referenced by cwist_assets_match(), cwist_http_request_create(), cwist_http_request_destroy(), and cwist_mux_serve().

◆ path_params

cwist_query_map * cwist_http_request::path_params

Parsed path parameters (e.g. :id)

Parsed path parameters (e.g. :id).

Definition at line 70 of file http.h.

Referenced by cwist_http_request_create(), cwist_http_request_destroy(), and cwist_mux_serve().

◆ private_data

void * cwist_http_request::private_data

Internal framework use (protocol-specific context).

Definition at line 78 of file http.h.

Referenced by cwist_http2_push_resource(), cwist_http3_push_resource(), and cwist_http_request_create().

◆ query

cwist_sstring * cwist_http_request::query

e.g., "active=true" (raw)

Definition at line 68 of file http.h.

Referenced by cwist_http_request_create(), and cwist_http_request_destroy().

◆ query_params

cwist_query_map * cwist_http_request::query_params

Parsed query parameters.

Definition at line 69 of file http.h.

Referenced by cwist_http_request_create(), and cwist_http_request_destroy().

◆ route_middleware_state

void* cwist_http_request::route_middleware_state

Router middleware chain state (internal).

Definition at line 181 of file http.h.

◆ session

void* cwist_http_request::session

cwist_session_t pointer set by session middleware.

Definition at line 185 of file http.h.

Referenced by cwist_http_request_destroy(), and cwist_session_start().

◆ stream_id

uint32_t cwist_http_request::stream_id

HTTP/2 or HTTP/3 stream ID (0 for HTTP/1.1).

Definition at line 77 of file http.h.

Referenced by cwist_async_defer(), cwist_http2_push_resource(), and cwist_http_request_create().

◆ te_chunked_seen

bool cwist_http_request::te_chunked_seen

Parser saw and validated Transfer-Encoding: chunked (HTTP/1.1).

Definition at line 173 of file http.h.

Referenced by cwist_http_receive_request(), and cwist_http_receive_request_nb().

◆ upgraded

bool cwist_http_request::upgraded

◆ version

cwist_sstring * cwist_http_request::version

e.g., "HTTP/1.1"

Definition at line 71 of file http.h.

Referenced by cwist_http_request_create(), and cwist_http_request_destroy().

◆ ws_async_handoff

bool cwist_http_request::ws_async_handoff

WebSocket async path took fd ownership; C1M layer must detach.

Definition at line 189 of file http.h.


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