sreq

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2024 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Check bool

Functions

func BodyFileUpload

func BodyFileUpload(fileUpload FileParam, Params ...ParamInUploadFile) (*bytes.Buffer, string)

func FileUpload

func FileUpload(request *http.Request, multipath string, proxy string, redirect bool, jar *cookiejar.Jar) (*http.Response, time.Duration)

func Sends

func Sends(req []*Request, proxy string, redirect bool, worker int, f func(c ChannelResult))

func SpawnRequest

func SpawnRequest(request *http.Request, proxy string, redirect bool, jar *cookiejar.Jar) (*http.Response, time.Duration)

func UnzipResp

func UnzipResp(resp *http.Response) string

read body response

Types

type ChannelResult

type ChannelResult struct {
	Index   int
	Resp    *http.Response
	Req     *http.Request
	Time    time.Duration
	DataRet rune
}

func SPrintln added in v1.1.2

func SPrintln(data []ChannelResult, temp ChannelResult) []ChannelResult

With rune in DataRet u can use to print string or int Example: string(v.DataRet) int(v.DataRet)

type CustomTransport

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

func NewTransport

func NewTransport(proxy string) *CustomTransport

NewTransport return CustomTransport

func (*CustomTransport) ConnDuration

func (tr *CustomTransport) ConnDuration() time.Duration

func (*CustomTransport) Dial

func (tr *CustomTransport) Dial(network, addr string) (net.Conn, error)

func (*CustomTransport) Duration

func (tr *CustomTransport) Duration() time.Duration

func (*CustomTransport) ReqDuration

func (tr *CustomTransport) ReqDuration() time.Duration

func (*CustomTransport) RoundTrip

func (tr *CustomTransport) RoundTrip(r *http.Request) (*http.Response, error)

Handle Time in request

type FileParam

type FileParam struct {
	NameOfParam string
	FileName    string
}

type ParamInUploadFile

type ParamInUploadFile struct {
	ParamName  string
	ParamValue string
}

Process Upload File

type Request added in v1.1.2

type Request struct {
	Req     *http.Request
	DataRet rune
}

func AddQueue

func AddQueue(req []*Request, tempreq *Request) []*Request

Jump to

Keyboard shortcuts

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