This is a library that handles Accept headers, which form the basis of content negotiation in HTTP server applications written in Go. It provides an implementation of the proactive server-driven content negotiation algorithm specified in RFC-7231 section 5.3.
There is also support for
- conditional requests (RFC-7232) using entity tags and last-modified timestamps.
- gzip-compressed responses when the client requests them
Bring your favourite router and framework - this library can be used with the standard net/http package as well as Gin, Echo, etc.
Please see the documentation for more info.
This API is well-tested and known to work but it may yet require breaking API changes. Use at your own risk.