util

package
v0.0.0-...-f50a457 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CookieRequest

type CookieRequest struct {
	// contains filtered or unexported fields
}

func NewCookieRequest

func NewCookieRequest() *CookieRequest

func (*CookieRequest) Get

func (c *CookieRequest) Get(url string, params map[string]interface{}) (string, error)

func (*CookieRequest) GetFile

func (c *CookieRequest) GetFile(url string, params map[string]interface{}) ([]byte, error)

func (*CookieRequest) GetJson

func (c *CookieRequest) GetJson(url string, params map[string]interface{}, dataOut interface{}) error

func (*CookieRequest) Post

func (c *CookieRequest) Post(url string, params map[string]interface{}, data map[string]interface{}, rawBody []byte, sendJson bool) (string, error)

func (*CookieRequest) PostJson

func (c *CookieRequest) PostJson(url string, params map[string]interface{}, data map[string]interface{}, rawBody []byte, sendJson bool, dataOut interface{}) error

func (*CookieRequest) SetHeaders

func (c *CookieRequest) SetHeaders(headers map[string]string)

func (*CookieRequest) UpdateHeaders

func (c *CookieRequest) UpdateHeaders(headers map[string]string)

func (*CookieRequest) UploadFile

func (c *CookieRequest) UploadFile(url string, params map[string]interface{}, fileParamName string, fileName string, file io.ReadCloser) (string, error)

type Request

type Request interface {
	Get(string, map[string]interface{}) (string, error)
	GetJson(string, map[string]interface{}, interface{}) error
	Post(string, map[string]interface{}, map[string]interface{}, []byte, bool) (string, error)
	PostJson(string, map[string]interface{}, map[string]interface{}, []byte, bool, interface{}) error
	GetFile(string, map[string]interface{}) ([]byte, error)
	UploadFile(string, map[string]interface{}, string, string, io.ReadCloser) (string, error)
	SetHeaders(map[string]string)
	UpdateHeaders(map[string]string)
}

Jump to

Keyboard shortcuts

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