utils

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HTTP_SUCC = iota
	HTTP_FAIL
	HTTP_ERROR
)

Variables

This section is empty.

Functions

func SetGlobalHttpProxy

func SetGlobalHttpProxy(u string) (err error)

func SetGlobalHttpTransfer

func SetGlobalHttpTransfer(u string) (err error)

Types

type HttpError

type HttpError struct {
	ErrorCode int
	HttpCode  int
	ErrorMsg  string
}

func HttpWebRequest

func HttpWebRequest(method string, requestUrl string, header url.Values,
	query url.Values, cookies []*http.Cookie, body []byte, insecure bool, redirect bool) (
	responseUrl string,
	responseHeader url.Values,
	responseQuery url.Values,
	responseBody []byte,
	responseCookies []*http.Cookie,
	httpError *HttpError,
)

func NewError

func NewError(code int, httpCode int, msg string) *HttpError

func (*HttpError) Error

func (e *HttpError) Error() string

Jump to

Keyboard shortcuts

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