Module cow_http

Data Types

fin()

fin() = fin | nofin

headers()

headers() = [{binary(), iodata()}]

pseudo_headers()

pseudo_headers() = #{} | #{status := cow_http:status()} | #{method := binary(), authority := binary()} | #{method := binary(), scheme := binary(), authority := binary(), path := binary(), protocol := binary()} | #{method := binary(), scheme := binary(), authority => binary(), path := binary()}

status()

status() = 100..999

Function Index

format_semantic_error/1
headers/1
merge_pseudo_headers/2
parse_fullpath/1
parse_headers/1
parse_request_line/1
parse_status_line/1
parse_version/1
process_headers/5
remove_http1_headers/1
request/4
response/3
status_to_integer/1
version/1

Function Details

format_semantic_error/1

format_semantic_error(X1::atom()) -> atom()

headers/1

headers(Headers::headers()) -> iodata()

merge_pseudo_headers/2

merge_pseudo_headers(PseudoHeaders::pseudo_headers(), Headers0::headers()) -> headers()

parse_fullpath/1

parse_fullpath(Fullpath::binary()) -> {binary(), binary()}

parse_headers/1

parse_headers(Data::binary()) -> {[{binary(), binary()}], binary()}

parse_request_line/1

parse_request_line(Data::binary()) -> {binary(), binary(), cow_http1:version(), binary()}

parse_status_line/1

parse_status_line(Data::binary()) -> {cow_http1:version(), status(), binary(), binary()}

parse_version/1

parse_version(Data::binary()) -> cow_http1:version()

process_headers/5

process_headers(Headers0::headers(), Type::request | push_promise | response | trailers, ReqMethod::binary() | undefined, IsFin::fin(), LocalSettings::#{enable_connect_protocol => boolean(), any() => any()}) -> {headers, headers(), pseudo_headers(), non_neg_integer() | undefined} | {push_promise, headers(), pseudo_headers()} | {trailers, headers()} | {error, atom()}

remove_http1_headers/1

remove_http1_headers(Headers::headers()) -> headers()

request/4

request(Method::binary(), Path::iodata(), Version::cow_http1:version(), Headers::headers()) -> iodata()

response/3

response(Status::status() | binary(), Version::cow_http1:version(), Headers::headers()) -> iodata()

status_to_integer/1

status_to_integer(Status::status() | binary()) -> status()

version/1

version(Version::cow_http1:version()) -> binary()


Generated by EDoc