header

package
v0.0.0-...-4a23794 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2022 License: BSD-3-Clause, BSD-3-Clause Imports: 2 Imported by: 5

README

Package header is based on a copy of https://github.com/golang/gddo/tree/master/httputil/header.

Documentation

Overview

Package header provides functions for parsing HTTP headers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseList

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.

Types

type Link struct {
	Href string
	Rel  []string
}

Link identifies a parsed HTTP Link header.

func ParseLink(s string) (link Link)

ParseLink parses an individual HTTP Link header value. Callers should first call ParseList to split the raw header string into its values.

Jump to

Keyboard shortcuts

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