An open API service indexing awesome lists of open source software.

https://github.com/albertnadal/httpacceptparser

C++11 class for parsing HTTP 'Accept' headers. Implemented according to the RFC 7231 and 2616.
https://github.com/albertnadal/httpacceptparser

content-negotiation content-type cpp11 http http-server negotiation-protocols

Last synced: about 1 year ago
JSON representation

C++11 class for parsing HTTP 'Accept' headers. Implemented according to the RFC 7231 and 2616.

Awesome Lists containing this project

README

          

# HttpAcceptParser
C++11 class for parsing HTTP 'Accept' headers. Implemented according to the RFC 7231 and 2616.

Example:
```cpp
const auto selectedContentType = HttpAcceptParser::parse("*/*;q=0.5, text/xml;q=0.55, image/png;q=0", { "application/json", "image/png", "text/xml", "text/plain" });
assert(selectedContentType == "text/xml");
```