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.
- Host: GitHub
- URL: https://github.com/albertnadal/httpacceptparser
- Owner: albertnadal
- Created: 2021-08-23T16:18:26.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-08-23T17:04:46.000Z (over 4 years ago)
- Last Synced: 2025-01-25T19:30:34.927Z (about 1 year ago)
- Topics: content-negotiation, content-type, cpp11, http, http-server, negotiation-protocols
- Language: C++
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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");
```