set_header

package
v0.0.0-...-206c9bf Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2020 License: BSD-3-Clause Imports: 7 Imported by: 0

README

set_header

用于在HTTP会话的请求和响应头部中设置参数

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SetHeader

type SetHeader struct {
	RequestHeader  map[string]string `json:"request_header,omitempty"`
	ResponseHeader map[string]string `json:"response_header,omitempty"`
}

header数据处理

func New

func New(config string) (*SetHeader, error)

新建中间件实例

func (*SetHeader) Action

func (self *SetHeader) Action(resp http.ResponseWriter, req *http.Request) (bool, error)

中间件行为

func (*SetHeader) GetName

func (self *SetHeader) GetName() string

func (SetHeader) MarshalEasyJSON

func (v SetHeader) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (SetHeader) MarshalJSON

func (v SetHeader) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*SetHeader) UnmarshalEasyJSON

func (v *SetHeader) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*SetHeader) UnmarshalJSON

func (v *SetHeader) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

Jump to

Keyboard shortcuts

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