retryhttpclient

package
v3.1.3 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	RtryRedirect   *retryablehttp.Client
	RtryNoRedirect *retryablehttp.Client
)
View Source
var (
	HTTP_PREFIX  = "http://"
	HTTPS_PREFIX = "https://"
)

Functions

func CheckProtocol

func CheckProtocol(host string) (string, error)

return error if host is not living or if host is live return http(s) url

func Get

func Get(target string) ([]byte, int, error)

func GetDefaultTimeout

func GetDefaultTimeout() time.Duration

func GetMaxDefaultBody

func GetMaxDefaultBody() int64

func GetTimeout

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

func Init

func Init(opt *Options) (err error)

func ParseRequest

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

func Request

func Request(target string, header []string, rule poc.Rule, variableMap map[string]any) error

func ReverseGet

func ReverseGet(target string) ([]byte, error)

Reverse URL Get request

func Url2UrlType

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

Types

type Options

type Options struct {
	Proxy           string
	Timeout         int
	Retries         int
	MaxRespBodySize int
}

Jump to

Keyboard shortcuts

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