0.0
No commit activity in last 3 years
No release in over 3 years
A parser for parsing the accept headers of a HTTP request
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
 Dependencies

Development

~> 1.4
~> 0.6

Runtime

~> 1.7
 Project Readme

An accept header parser and API. Contains nothing Scorched specific, it's only named such because every other obvious name has been used by the other libraries already in existence, none of which actually parse the accept header correctly, or implement proper prioritisation of media ranges.

Example

accept_header = AcceptHeader.new('text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8')
accept_header.best_of('application/json', 'video/mp4')

Refer to specs and API documentation for more information.

Tests

mtest spec