runtime: github.com/go-openapi/runtime/middleware/header Index | Files

package header

import "github.com/go-openapi/runtime/middleware/header"

Package header provides functions for parsing HTTP headers.

Index

Package Files

header.go

func Copy Uses

func Copy(header http.Header) http.Header

Copy returns a shallow copy of the header.

func ParseAccept Uses

func ParseAccept(header http.Header, key string) (specs []AcceptSpec)

ParseAccept parses Accept* headers.

func ParseAccept2 Uses

func ParseAccept2(header http.Header, key string) (specs []AcceptSpec)

ParseAccept2 ...

func ParseList Uses

func ParseList(header http.Header, key string) []string

ParseList parses a comma separated list of values. Commas are ignored in quoted strings. Quoted values are not unescaped or unquoted. Whitespace is trimmed.

func ParseTime Uses

func ParseTime(header http.Header, key string) time.Time

ParseTime parses the header as time. The zero value is returned if the header is not present or there is an error parsing the header.

func ParseValueAndParams Uses

func ParseValueAndParams(header http.Header, key string) (string, map[string]string)

ParseValueAndParams parses a comma separated list of values with optional semicolon separated name-value pairs. Content-Type and Content-Disposition headers are in this format.

type AcceptSpec Uses

type AcceptSpec struct {
    Value string
    Q     float64
}

AcceptSpec ...

Package header imports 3 packages (graph) and is imported by 2 packages. Updated 2017-10-31. Refresh now. Tools for package owners.