httphdr

package
v0.27.6 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package httphdr provides some support for HTTP headers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContentDisposition

func ContentDisposition(dispType string, filename string) string

ContentDisposition returns a formatted http://tools.ietf.org/html/rfc6266 header.

Types

type Accept

type Accept []KeyVal

func (Accept) Match

func (A Accept) Match(accept string) interface{}

Match the given Accept header.

Parts of the code is copied from github.com/jchannon/negotiator.

type KeyVal

type KeyVal struct {
	Val interface{}
	Key string
}

Jump to

Keyboard shortcuts

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