24 lines
571 B
Markdown
24 lines
571 B
Markdown
# go-httpaccess
|
|
|
|
Package **httpaccess** implements tools to deal with the HTTP "Accept" header.
|
|
|
|
## Documention
|
|
|
|
Online documentation, which includes examples, can be found at: http://godoc.org/github.com/reiver/go-httpaccess
|
|
|
|
[![GoDoc](https://godoc.org/github.com/reiver/go-httpaccess?status.svg)](https://godoc.org/github.com/reiver/go-httpaccess)
|
|
|
|
## Example
|
|
```go
|
|
//
|
|
values := httprequest.Header.Values("Accept")
|
|
|
|
// ...
|
|
|
|
accept, err := httpaccess.Parse(values...)
|
|
|
|
// ...
|
|
|
|
mediatype, err := accept.Negotiate("text/gemini", "text/html", "application/xhtml+xml")
|
|
```
|