client

package
v0.0.0-...-315b7b0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCookie

func AddCookie(key, value string) interfaces.ClientOption

func AddHeader

func AddHeader(key, value string) interfaces.ClientOption

func AddQueryParam

func AddQueryParam(key, value string) interfaces.ClientOption

func WithAuthToken

func WithAuthToken(token string) interfaces.ClientOption

func WithBasicAuthentication

func WithBasicAuthentication(username, password string) interfaces.ClientOption

func WithBody

func WithBody(body string) interfaces.ClientOption

func WithUrl

func WithUrl(url string) interfaces.ClientOption

func WithX509Certificate

func WithX509Certificate(pem, key string) interfaces.ClientOption

Types

type Resty

type Resty struct {
	Url         string
	QueryParams map[string]string
	Headers     map[string]string
	Cookies     map[string]string
	AuthToken   string
	Body        string
	Username    string
	Password    string
	// contains filtered or unexported fields
}

func New

func New(options ...interfaces.ClientOption) (*Resty, error)

func (*Resty) DELETE

func (r *Resty) DELETE(h interface{}) error

func (*Resty) GET

func (r *Resty) GET(h interface{}) error

func (*Resty) HEAD

func (r *Resty) HEAD(h interface{}) error

func (*Resty) OPTIONS

func (r *Resty) OPTIONS(h interface{}) error

func (*Resty) POST

func (r *Resty) POST(h interface{}) error

func (*Resty) PUT

func (r *Resty) PUT(h interface{}) error

Jump to

Keyboard shortcuts

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