Go to file
Charles Iliya Krempeaux 45de8a1a6e initial commits 2023-08-11 16:59:14 -07:00
mediarange initial commits 2023-08-11 16:23:51 -07:00
LICENSE initial commits 2023-08-11 14:13:09 -07:00
README.md initial commits 2023-08-11 16:59:14 -07:00
go.mod initial commits 2023-08-11 14:15:19 -07:00
httpaccept.go initial commits 2023-08-11 16:21:18 -07:00
httpaccept_parse_test.go initial commits 2023-08-11 16:21:18 -07:00
httpaccept_string_test.go initial commits 2023-08-11 16:21:18 -07:00
notacceptable.go initial commits 2023-08-11 12:09:18 -07:00

README.md

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/sourcecode.social/reiver/go-httpaccess

GoDoc

Example

//
values := httprequest.Header.Values("Accept")

// ...

accept, err := httpaccess.Parse(values...)

// ...

mediatype, err := accept.Negotiate("text/gemini", "text/html", "application/xhtml+xml")