client

package
v0.0.0-...-aa82e8d Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MethodGET    = "GET"
	MethodPOST   = "POST"
	MethodPUT    = "PUT"
	MethodDELETE = "DELETE"
)

Variables

View Source
var (
	AvailableMethods = map[string]bool{
		MethodGET:    true,
		MethodPOST:   true,
		MethodPUT:    true,
		MethodDELETE: true,
	}
)
View Source
var (
	ErrCallUnsupportedMethod = errors.New("unsupported request method")
)

Functions

This section is empty.

Types

type Check

type Check struct {
	Err         error   `json:"error"`
	StatusCode  int     `json:"statusCode"`
	Bytes       int     `json:"bytes"`
	TimeElapsed float64 `json:"timeElapsed"`
}

Check ..

type Client

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

func NewClient

func NewClient(path, method string, body io.Reader, timeout time.Duration) (*Client, error)

func (*Client) Call

func (cl *Client) Call() *Check

Jump to

Keyboard shortcuts

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