accept


Description:


[ Version ( since = "0.3" ) ]
public HandlerCallback accept (string content_types, owned ForwardCallback<string> forward = forward)

Negotiate a 'Accept' header.

It understands patterns that match all types (eg. '*\/*'), subtypes (eg. 'text\/*') and compound subtypes (eg. 'application/vnd.api+json')

For compound subtypes, it checks if the accepted subtypes by the user agent form a subset of the proposed ones. Note that the '*' subtype is always considered acceptable.


Package: valum-0.3