interceptor

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package interceptor 拦截器

Index

Constants

This section is empty.

Variables

Handler 拦截器handler

Functions

This section is empty.

Types

type Example

type Example struct{}

func (Example) BeforeRequest

func (Example) BeforeRequest(ctx *goproxy.Context)

BeforeRequest 请求发送前, 修改request

func (Example) BeforeResponse

func (Example) BeforeResponse(ctx *goproxy.Context, resp *http.Response, err error)

BeforeResponse 响应发送前, 修改response

func (Example) Connect

func (Example) Connect(ctx *goproxy.Context, rw http.ResponseWriter)

Connect 收到客户端连接, 自定义response返回 NOTICE: HTTPS只能访问 ctx.Req.URL.Host, 不能访问Header和Body, 不能使用rw

Jump to

Keyboard shortcuts

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