dhttp

package module
v0.0.0-...-3db537d Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func Req

func Req(ctx context.Context, method string, addr string) dscope.Scope

Types

type Addr

type Addr string

type Content

type Content []byte
type Cookie string

type Def

type Def struct{}

func (Def) Client

func (Def) Client(
	timeout Timeout,
	cookieJar http.CookieJar,
	transport *http.Transport,
) *http.Client

func (Def) Content

func (Def) Content(
	getResp GetResponse,
	deadline RetryDeadline,
) (
	content Content,
	bs []byte,
	resp *http.Response,
)

func (Def) Cookie

func (Def) Cookie() Cookie

func (Def) CookieJar

func (Def) CookieJar() http.CookieJar

func (Def) GoqueryDocument

func (Def) GoqueryDocument(
	content []byte,
) (
	doc *goquery.Document,
)

func (Def) Headers

func (Def) Headers() Headers

func (Def) MaxRetry

func (Def) MaxRetry() MaxRetry

func (Def) Request

func (Def) Request(
	method Method,
	addr Addr,
	newReqBody NewRequestBody,
	userAgent UserAgent,
	cookie Cookie,
	headers Headers,
	ctx context.Context,
) NewRequest

func (Def) RequestBody

func (Def) RequestBody() NewRequestBody

func (Def) Response

func (Def) Response(
	client *http.Client,
	newReq NewRequest,
	deadline RetryDeadline,
	maxRetry MaxRetry,
) GetResponse

func (Def) RetryDeadline

func (Def) RetryDeadline(
	d RetryDuration,
) RetryDeadline

func (Def) RetryDuration

func (Def) RetryDuration() RetryDuration

func (Def) StringContent

func (Def) StringContent(
	content []byte,
) string

func (Def) Timeout

func (Def) Timeout() Timeout

func (Def) Transport

func (Def) Transport() *http.Transport

func (Def) UserAgent

func (Def) UserAgent() UserAgent

type GetResponse

type GetResponse func() *http.Response

type Headers

type Headers [][2]string

func (Headers) IsReducer

func (Headers) IsReducer()

type MaxRetry

type MaxRetry int

type Method

type Method string

type NewRequest

type NewRequest func() *http.Request

type NewRequestBody

type NewRequestBody func() io.Reader

type RetryDeadline

type RetryDeadline time.Time

type RetryDuration

type RetryDuration time.Duration

type Timeout

type Timeout time.Duration

type UserAgent

type UserAgent string

Jump to

Keyboard shortcuts

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