pkoretic / recurse

Qt based micro web framework with middleware design
MIT License
20 stars 2 forks source link

implement 'Accept' #25

Open pkoretic opened 8 years ago

pkoretic commented 8 years ago

https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

possible usage:

request.accepts("application/json");

# multiple
request.accepts({"html", "application/json"});

or

request.accepts("html").accepts("application/json")

we also need these:

acceptsCharsets acceptsEncodings acceptsLanguages