negotiate

package
v0.0.0-...-00f1f15 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 11, 2015 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NegotiateCharset

func NegotiateCharset(header *string, charsets []string) (options []string, err locale.Error)

NegotiateCharset negotiates the character set (use the `Accept-Charset:` header).

func NegotiateContentType

func NegotiateContentType(header *string, contenttypes []string) (options []string, err locale.Error)

NegotiateContentType negotiates the content type (use the `Accept:` header).

func NegotiateEncoding

func NegotiateEncoding(header *string, encodings []string) (options []string, err locale.Error)

NegotiateEncoding negotiates the encoding (use the `Accept-Encoding:` header).

func NegotiateLanguage

func NegotiateLanguage(header *string, languageTags []string) (options []string, err locale.Error)

NegotiateLanguage negotiates the language (use the `Accept-Language:` header).

Types

type ParseError

type ParseError struct {
	Header  string
	Message locale.Error
}

ParseError is an error that was encountered while parsing the value for Header.

func (ParseError) Error

func (e ParseError) Error() string

func (ParseError) L10NString

func (e ParseError) L10NString(l locale.Spec) string

func (ParseError) Locales

func (e ParseError) Locales() []locale.Spec

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL