http

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2022 License: MIT Imports: 18 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AcquireProtoRequestPool

func AcquireProtoRequestPool() *proto.Request

func AcquireProtoResponsePool

func AcquireProtoResponsePool() *proto.Response

func CopyRequest

func CopyRequest(req *http.Request, dstRequest *fasthttp.Request, data []byte)

func DealMultipart

func DealMultipart(contentType string, ruleBody string) (result string, err error)

func New

func New(options *config.Options) *fasthttp.Client

fasthttp initialization configuration proxy、readtimeout、writetimeout、max_idle、concurrency、max_responsebody_sizse、max_redirect_count eg.

func ParseRequest

func ParseRequest(oReq *http.Request) (*proto.Request, error)

func ReleaseProtoRequestPool

func ReleaseProtoRequestPool(req *proto.Request)

func ReleaseProtoResponsePool

func ReleaseProtoResponsePool(rsp *proto.Response)

func Url2UrlType

func Url2UrlType(u *url.URL) *proto.UrlType

Types

type FastClient

type FastClient struct {
	Client      *fasthttp.Client
	MaxRedirect int32
	DialTimeout int32
}

func (*FastClient) AssignVariableMap

func (fc *FastClient) AssignVariableMap(find string, variableMap map[string]interface{}) string

替换变量的值 find string 规定要查找的值 oldstr 规定被搜索的字符串 newstr 规定替换的值

func (*FastClient) HTTPRequest

func (fc *FastClient) HTTPRequest(httpRequest *http.Request, rule poc.Rule, variableMap map[string]interface{}) error

func (*FastClient) SampleHTTPRequest

func (fc *FastClient) SampleHTTPRequest(httpRequest *http.Request) (*proto.Response, error)

reverse http request

Jump to

Keyboard shortcuts

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