msclient

package
v1.0.12 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrorResp = 1 + iota
	ErrorMarshal
)

Variables

This section is empty.

Functions

func DefaultUnmarshaller

func DefaultUnmarshaller(body []byte, result interface{}) error

DefaultUnmarshaller unmarshal to errs.Err

Types

type Call

type Call struct {
	*requestwrap.Request
	Unmarshaller func(body []byte, result interface{}) error
}

func New

func New(baseUrl string, headers, cookies map[string]string, timeout int) *Call

func (*Call) Delete

func (c *Call) Delete(result interface{}, path string, query, form map[string]string) error

func (*Call) Get

func (c *Call) Get(result interface{}, path string, query map[string]string) error

func (*Call) Patch

func (c *Call) Patch(result interface{}, path string, query, form map[string]string) error

func (*Call) Post

func (c *Call) Post(result interface{}, path string, query, form map[string]string, files []request.FileField) error

func (*Call) PostFile

func (c *Call) PostFile(result interface{}, path string, query, form map[string]string, files map[string]string) error

func (*Call) Put

func (c *Call) Put(result interface{}, path string, query, form map[string]string) error

func (*Call) Unmarshal

func (c *Call) Unmarshal(body []byte, result interface{}) error

Jump to

Keyboard shortcuts

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