ewebmachine v2.1.2 Ewebmachine.Core.Utils
HTTP utility module
Summary
Functions
HTTP Charset negociation, get the charset to use from
HTTP Encoding negociation, get the encoding to use from
HTTP Content negociation, get the content type to send from
Convert rfc1123 or rfc850 to :calendar dates
format a norm_content_type
into an HTTP content type header
Match normalized media types accepting a partial match (wildcard or incomplete params)
get HTTP status label from HTTP code
convert any content type representation (see spec) into a norm_content_type
Remove quotes from HTTP quoted string
Convert a calendar date to a rfc1123 date string
Get the string list from a comma separated list of HTTP quoted strings
Types
Functions
HTTP Charset negociation, get the charset to use from :
acc_char_hdr
, the HTTP headerAccept-Charset
charsets
, the list of supported charsets
HTTP Encoding negociation, get the encoding to use from :
acc_enc_hdr
, the HTTP headerAccept-Encoding
encs
, the list of supported encoding
choose_media_type([norm_content_type], String.t) :: norm_content_type | nil
HTTP Content negociation, get the content type to send from :
accept_header
, the HTTP headerAccept
ct_provided
, the list of provided content types
convert_request_date(String.t) :: {{year :: integer, month :: integer, day :: integer}, {h :: integer, min :: integer, sec :: integer}} | :bad_date
Convert rfc1123 or rfc850 to :calendar dates
format a norm_content_type
into an HTTP content type header
Match normalized media types accepting a partial match (wildcard or incomplete params)
get HTTP status label from HTTP code
normalize_mtype({type :: String.t, params :: map} | type :: String.t | norm_content_type) :: norm_content_type
convert any content type representation (see spec) into a norm_content_type
rfc1123_date({{year :: integer, month :: integer, day :: integer}, {h :: integer, min :: integer, sec :: integer}}) :: String.t
Convert a calendar date to a rfc1123 date string