Module cow_http1

Data Types

version()

version() = 'HTTP/1.0' | 'HTTP/1.1'

Function Index

headers/1
parse_fullpath/1Extract path and query string from a binary, removing any fragment component.
parse_headers/1Parse the list of headers.
parse_request_line/1Parse the request line.
parse_status_line/1Parse the status line.
parse_version/1Convert an HTTP version to atom.
request/4Return formatted request-line and headers.
response/3
status_to_integer/1
version/1Return the version as a binary.

Function Details

headers/1

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

parse_fullpath/1

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

Extract path and query string from a binary, removing any fragment component.

parse_headers/1

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

Parse the list of headers.

parse_request_line/1

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

Parse the request line.

parse_status_line/1

parse_status_line(X1::binary()) -> {version(), cow_http:status(), binary(), binary()}

Parse the status line.

parse_version/1

parse_version(X1::binary()) -> version()

Convert an HTTP version to atom.

request/4

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

Return formatted request-line and headers.

response/3

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

status_to_integer/1

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

version/1

version(X1::version()) -> binary()

Return the version as a binary.


Generated by EDoc