rest

package
v0.0.0-...-ed9cc5f Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2021 License: BSD-3-Clause Imports: 7 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 interface {
	// Headers retrieves the optional headers to include on the REST request
	Headers() Headers
	// QParms retrieves the optional query parameters to include on the REST request
	QParms() QParms
	// Get sends a GET request to the HTTP server
	Get(url string) ([]byte, error)
}

Client is a REST client that may be used to send request to a server

func NewClient

func NewClient(headers Headers, qparms QParms) Client

NewClient creates a new REST client

type ErrHttp

type ErrHttp struct {
	StatusCode int
	Status     string
}

func (ErrHttp) Error

func (err ErrHttp) Error() string

type Headers

type Headers map[string]string

Headers are the optional headers to include on an HTTP request

type QParms

type QParms map[string]interface{}

QParms are the optional query parameters to include on a HTTP request

Jump to

Keyboard shortcuts

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