retryhttpclient

package
v0.0.0-...-ff8f6dd Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	RtryRedirect   *retryablehttp.Client
	RtryNoRedirect *retryablehttp.Client

	RtryNoRedirectHttpClient *http.Client
	RtryRedirectHttpClient   *http.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 Init

func Init(opt *Options) (err error)

func ParseRequest

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

func Request

func Request(target 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