Module picohttpparser stdlib

picohttpparser
Version:
0.3.3
License:
MIT
Dependencies from vmod:
0
Imports:
0
Imported by:
1
Repository:
OS-specific
Show selected OS-specific symbols.
Backend-specific
Show selected Backend-specific symbols.

Dependencies defined in v.mod

This section is empty.

Imports

This section is empty.

Imported by

Overview

picohttpparser is a thin wrapper over picohttpparser, which in turn is "a tiny, primitive, fast HTTP request/response parser."

Aliases

This section is empty.

Constants

This section is empty.

Sum types

This section is empty.

Functions

#fn cmp

inline
fn cmp(dst string, src string) bool

#fn cmpn

inline
fn cmpn(dst string, src string, n int) bool

Structs

#struct Request

pub struct Request {
mut:
	prev_len int
pub mut:
	method      string
	path        string
	headers     [100]C.phr_header
	num_headers u64
	body        string
}

#fn (&Request) parse_request

inline
fn (mut r &Request) parse_request(s string, max_headers int) int

#fn (&Request) parse_request_path

inline
fn (mut r &Request) parse_request_path(s string) int

#fn (&Request) parse_request_path_pipeline

inline
fn (mut r &Request) parse_request_path_pipeline(s string) int

#struct Response

pub struct Response {
	fd int
pub:
	date      &u8 = unsafe { nil }
	buf_start &u8 = unsafe { nil }
pub mut:
	buf &u8 = unsafe { nil }
}

#fn (&Response) write_string

inline
fn (mut r &Response) write_string(s string)

#fn (&Response) http_ok

inline
fn (mut r &Response) http_ok() &Response

#fn (&Response) header

inline
fn (mut r &Response) header(k string, v string) &Response

#fn (&Response) header_date

inline
fn (mut r &Response) header_date() &Response

#fn (&Response) header_server

inline
fn (mut r &Response) header_server() &Response

#fn (&Response) content_type

inline
fn (mut r &Response) content_type(s string) &Response

#fn (&Response) html

inline
fn (mut r &Response) html() &Response

#fn (&Response) plain

inline
fn (mut r &Response) plain() &Response

#fn (&Response) json

inline
fn (mut r &Response) json() &Response

#fn (&Response) body

inline
fn (mut r &Response) body(body string)

#fn (&Response) http_404

inline
fn (mut r &Response) http_404()

#fn (&Response) http_405

inline
fn (mut r &Response) http_405()

#fn (&Response) http_500

inline
fn (mut r &Response) http_500()

#fn (&Response) raw

inline
fn (mut r &Response) raw(response string)

#fn (&Response) end

inline
fn (mut r &Response) end() int

Interfaces

This section is empty.

Enums

This section is empty.