curl

package
v0.0.0-...-63f4cd2 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Request

func Request(t test.TestHelper, url string, requestOption RequestOption, checks ...HTTPResponseCheckFunc) []byte

Types

type HTTPResponseCheckFunc

type HTTPResponseCheckFunc func(t test.TestHelper, response *http.Response, responseBody []byte, responseErr error, duration time.Duration)

type NilRequestOption

type NilRequestOption struct{}

func (NilRequestOption) ApplyToClient

func (n NilRequestOption) ApplyToClient(client *http.Client) error

func (NilRequestOption) ApplyToRequest

func (n NilRequestOption) ApplyToRequest(req *http.Request) error

type RequestOption

type RequestOption interface {
	ApplyToRequest(req *http.Request) error
	ApplyToClient(client *http.Client) error
}

func WithCookieJar

func WithCookieJar(jar *cookiejar.Jar) RequestOption

Jump to

Keyboard shortcuts

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