header

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package header 用于指定输出的报头

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Header struct {
	// contains filtered or unexported fields
}

Header 修正报头输出内容

func New

func New(next http.Handler, headers map[string]string, funcs func(http.Header)) *Header

New 声明一个用于输出报头的中间件

如果 funcs 不为空,则 funcs 与 headers 相同的内容, 以 funcs 为最终内容。

func (*Header) Delete added in v1.7.0

func (h *Header) Delete(name string) *Header

Delete 删除指定的报头

func (*Header) ServeHTTP added in v1.7.0

func (h *Header) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*Header) Set added in v1.7.0

func (h *Header) Set(name, value string) *Header

Set 添加或是修改报头

Jump to

Keyboard shortcuts

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