http_struct

package
v1.3.1-sp2 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPConfig

type HTTPConfig struct {
	Timeout    float64
	Proxies    []string
	Redirector func(i *http.Request, reqs []*http.Request) bool
	Session    interface{}
	GetParams  map[string]string
	Body       []byte
	Headers    map[string]string
}

func NewHTTPConfig

func NewHTTPConfig() *HTTPConfig

type HttpOption

type HttpOption func(req *HTTPConfig)

type YakHttpRequest

type YakHttpRequest struct {
	*http.Request
	Config *HTTPConfig
}

type YakHttpResponse

type YakHttpResponse struct {
	*http.Response
}

func (*YakHttpResponse) Data

func (y *YakHttpResponse) Data() string

func (*YakHttpResponse) GetHeader

func (y *YakHttpResponse) GetHeader(key string) string

func (*YakHttpResponse) Json

func (y *YakHttpResponse) Json() interface{}

func (*YakHttpResponse) Raw

func (y *YakHttpResponse) Raw() []byte

Jump to

Keyboard shortcuts

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