options

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2023 License: GPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FormFile

type FormFile struct {
	Filename string
	File     []byte
}

type Option

type Option struct {
	Client  *http.Client
	Method  string // http.MethodX
	Queries map[string]string
	Forms   map[string][]interface{}
	Header  http.Header
	Body    io.Reader
	// contains filtered or unexported fields
}

func CurlOption

func CurlOption() *Option

func (*Option) AddFormFile

func (op *Option) AddFormFile(key string, value *FormFile) *Option

func (*Option) AddFormValue

func (op *Option) AddFormValue(key string, value string) *Option

func (*Option) Query

func (op *Option) Query(key, value string) *Option

func (*Option) SetBasicAuth

func (op *Option) SetBasicAuth(username, password string) *Option

func (*Option) SetBearerAuth

func (op *Option) SetBearerAuth(token string) *Option

func (*Option) SetData

func (op *Option) SetData(body []byte) *Option

func (*Option) SetJSON

func (op *Option) SetJSON(v interface{}) error

func (*Option) SetMethod

func (op *Option) SetMethod(method string) *Option

func (*Option) SubmitFormData

func (op *Option) SubmitFormData() *Option

Jump to

Keyboard shortcuts

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