fetch

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2025 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fetch

func Fetch(ctx context.Context, r *Request) int

Types

type ContentType

type ContentType int
const (
	TypeUnknown ContentType = iota
	TypeImage
	TypeJSON
	TypeNDJSON
	TypeSSE
	TypeXML
)

type Request

type Request struct {
	DNSServer     *url.URL
	DryRun        bool
	Edit          bool
	Format        core.Format
	HTTP          core.HTTPVersion
	IgnoreStatus  bool
	Insecure      bool
	NoEncode      bool
	NoPager       bool
	Output        string
	PrinterHandle *core.Handle
	Redirects     *int
	TLS           uint16
	Verbosity     core.Verbosity

	Method      string
	URL         *url.URL
	Body        io.Reader
	Form        []core.KeyVal
	Multipart   *multipart.Multipart
	Headers     []core.KeyVal
	QueryParams []core.KeyVal
	AWSSigv4    *aws.Config
	Basic       *core.KeyVal
	Bearer      string
	JSON        bool
	XML         bool
	Proxy       *url.URL
	Timeout     time.Duration
}

Jump to

Keyboard shortcuts

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