http

package
v1.3.9 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	F = &fasthttp.Client{}
)

Functions

func AcquireProtoRequestPool

func AcquireProtoRequestPool() *proto.Request

func AcquireProtoResponsePool

func AcquireProtoResponsePool() *proto.Response

func CheckLive added in v1.3.6

func CheckLive(target string) string

target is not alive if return value is none http(s) else is alive. @date 2022.7.22

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 GetFingerprintRedirect added in v1.3.2

func GetFingerprintRedirect(httpRequest *http.Request) ([]byte, map[string][]string, int, error)

func GetTimeout added in v1.3.6

func GetTimeout(target string, timeout int) ([]byte, int, error)

func GetTitleRedirect added in v1.3.0

func GetTitleRedirect(httpRequest *http.Request, redirect int) ([]byte, int, error)

func Gopochttp added in v1.3.5

func Gopochttp(httpRequest *http.Request, redirects int) ([]byte, []byte, []byte, int, *proto.UrlType, error)

func Init added in v1.2.3

func Init(options *config.Options)

func IsFullHttpFormat added in v1.3.6

func IsFullHttpFormat(target string) bool

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 ReverseHttpRequest added in v1.3.0

func ReverseHttpRequest(httpRequest *http.Request) ([]byte, error)

func Url2UrlType

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

Types

type FastClient

type FastClient struct {
	MaxRedirect int32
	DialTimeout int32
	UserAgent   string
}

func (*FastClient) AssignVariableMap

func (fc *FastClient) AssignVariableMap(find string, variableMap map[string]any) string

func (*FastClient) HTTPRequest

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

func (*FastClient) HTTPRequest2 added in v1.2.3

func (fc *FastClient) HTTPRequest2(httpRequest *http.Request, rule poc.Rule, variableMap map[string]any) error

func (*FastClient) Reset added in v1.1.0

func (fc *FastClient) Reset()

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