api

parser.ch

Declarations in parser.ch

1 declarationshttp

Declarations

Public only
http#
Publicnamespace
namespace http
===== HTTP request/response parsers and URL utilities =====
url_decode#
Publicfunction
func url_decode(in_s : &string_view) : string
URL decode (percent-decoding)
hex_value#
Publicfunction
func hex_value(c : char) : int
parse_query#
Publicfunction
func parse_query(qs : &string_view) : vector<pair<string, string>>
Parse query string into simple vector of pairs
read_request_incremental#
Publicfunction
func read_request_incremental(s : Socket, buf : &Buffer, header_timeout_secs : long, max_header_bytes : usize, max_headers : uint, tls_ctx : *SSLContext) : Option<Request>
Incremental request reader
parse_request_from_bytes#
Publicfunction
func parse_request_from_bytes(buf : *u8, n : usize, s : Socket) : Option<Request>
Parse request from raw bytes
http_recv#
function
func http_recv(s : Socket, tls_ctx : *SSLContext, buf : *u8, cap : usize) : int
Helper to recv from socket or TLS context
read_response_incremental#
Publicfunction
func read_response_incremental(s : Socket, buf : &Buffer, timeout_secs : long, max_header_bytes : usize, tls_ctx : *SSLContext, max_body_len : usize, is_head_request : bool) : Option<Response>
Incremental response reader (with optional TLS support)
parse_response_from_bytes#
function
func parse_response_from_bytes(buf : *u8, n : usize, s : Socket) : Option<Response>