rest

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Headers map[string]string
	Dump    bool
	// contains filtered or unexported fields
}

Client is a simple rest client

func NewClient

func NewClient(dump bool, insecure bool) *Client

NewClient create a rest client

func (*Client) Delete

func (c *Client) Delete(url string, payload interface{}, v interface{}) error

Delete does a delete request

func (*Client) Get

func (c *Client) Get(url string, payload interface{}, v interface{}) error

Get does a get request

func (*Client) Head

func (c *Client) Head(url string, payload interface{}, v interface{}) error

Head does a get request

func (*Client) Post

func (c *Client) Post(url string, payload interface{}, v interface{}) error

Post does a post request

Jump to

Keyboard shortcuts

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