fetch

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2025 License: MIT Imports: 21 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
	TypeXML
)

type Request

type Request struct {
	DryRun        bool
	Edit          bool
	HTTP          client.HTTPVersion
	Insecure      bool
	NoEncode      bool
	NoFormat      bool
	NoPager       bool
	Output        string
	PrinterHandle *printer.Handle
	Verbosity     Verbosity

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

type Verbosity

type Verbosity int
const (
	VSilent Verbosity = iota
	VNormal
	VVerbose
	VExtraVerbose
)

Jump to

Keyboard shortcuts

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