View Source cowmachine_accept_language (cowmachine v1.10.3)

Accept-Language handling.

Link to this section Summary

Link to this section Functions

Link to this function

accept_header(AvailableLangs, AcceptHeader)

View Source
-spec accept_header(AvailableLangs, AcceptHeader) -> Result
                 when
                     AvailableLangs :: [{binary(), [binary()]}],
                     AcceptHeader :: cowmachine_req:context() | binary() | undefined,
                     Result :: {ok, binary()} | {error, nomatch | header}.
Link to this function

accept_list(AvailableLangs, AcceptableLangs)

View Source
-spec accept_list(AvailableLangs, AcceptableLangs) -> Result
               when
                   AvailableLangs :: [{binary(), [binary()]}],
                   AcceptableLangs :: [binary()],
                   Result :: {ok, binary()} | {error, nomatch}.