|
cwist
Modern C web framework with libttak runtime
|
#include <http.h>

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). | |
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().
| 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().
| 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().
| cwist_sstring * cwist_http_request::body |
Definition at line 73 of file http.h.
Referenced by cwist_app_req_bind_form(), cwist_app_req_bind_json(), cwist_graphql_serve(), cwist_http_receive_request(), cwist_http_receive_request_nb(), cwist_http_request_create(), cwist_http_request_destroy(), and cwist_https_receive_request().
| int cwist_http_request::client_fd |
Definition at line 75 of file http.h.
Referenced by cwist_app_http_handler(), cwist_app_http_handler_async(), cwist_async_defer(), cwist_http_receive_request_nb(), cwist_http_request_create(), cwist_https_receive_request(), and cwist_sse_stream_open().
| size_t cwist_http_request::content_length |
Definition at line 79 of file http.h.
Referenced by cwist_http_receive_request(), cwist_http_receive_request_nb(), cwist_http_request_create(), and cwist_https_receive_request().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| cwist_http_header_node * cwist_http_request::headers |
Definition at line 72 of file http.h.
Referenced by cwist_assets_respond(), cwist_http2_push_resource(), cwist_http3_push_resource(), cwist_http_request_create(), cwist_http_request_destroy(), cwist_mw_request_id_handler(), cwist_session_start(), and cwist_websocket_upgrade_response().
| 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().
| bool cwist_http_request::keep_alive |
Definition at line 74 of file http.h.
Referenced by cwist_async_defer(), and cwist_http_request_create().
| cwist_http_method_t cwist_http_request::method |
Definition at line 66 of file http.h.
Referenced by cwist_assets_match(), cwist_graphql_serve(), cwist_http_request_create(), cwist_mux_serve(), and cwist_mw_cors_handler().
| 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().
| 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().
| 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().
| 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().
| 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().
| void* cwist_http_request::route_middleware_state |
| 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().
| 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().
| 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().
| bool cwist_http_request::upgraded |
Definition at line 76 of file http.h.
Referenced by cwist_http_request_create(), cwist_sse_stream_open(), and cwist_websocket_upgrade().
| 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().
| bool cwist_http_request::ws_async_handoff |