Module fusco_lib

This module implements various library functions used in fusco.

Copyright © (C) 1999-2013, Erlang Solutions Ltd

Authors: Oscar Hellström (oscar@hellstrom.st), Diana Parra Corbacho (diana.corbacho@erlang-solutions.com), Ramon Lastres Guerrero (ramon.lastres@erlang-solutions.com).

Description

This module implements various library functions used in fusco

Data Types

fusco_cookie()

fusco_cookie() = #fusco_cookie{}

fusco_url()

fusco_url() = #fusco_url{}

Function Index

format_request/6
get_value/2Gets value from tuple list.
get_value/3Gets value from tuple list.
header_value/2 Returns the value associated with the Header in Headers.
host_header/2
is_close/1Compares header values to pre-defined values Faster than string:to_lower and then compare.
parse_url/1
to_lower/1Converts characters in a string ro lower case.

Function Details

format_request/6

format_request(Path::path(), Method::method(), Hdrs::headers(), Host::string(), Body::iolist(), Cookies::{boolean(), [fusco_cookie()]}) -> {iodata(), iodata()}

get_value/2

get_value(Key, List) -> term()

Gets value from tuple list

get_value/3

get_value(Key, List, Default) -> term()

Gets value from tuple list. If it is not present, returns default value.

header_value/2

header_value(Hdr::string() | binary(), Hdrs::headers()) -> undefined | term()

Returns the value associated with the Header in Headers. Header must be a lowercase string, since every header is mangled to check the match.

host_header/2

host_header(Host::host(), Port::port_num()) -> any()

is_close/1

is_close(C) -> any()

Compares header values to pre-defined values Faster than string:to_lower and then compare

parse_url/1

parse_url(URL::string()) -> fusco_url()

to_lower/1

to_lower(String::unicode:chardata()) -> unicode:chardata()

Converts characters in a string ro lower case.


Generated by EDoc