rest

package
v2.5.1+incompatible Latest Latest
Warning

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

Go to latest
Published: May 11, 2017 License: MIT Imports: 4 Imported by: 3

Documentation

Index

Constants

View Source
const (
	// ContentType is the key for the Content-Type header
	ContentType = "Content-Type"
	// ApplicationJSON is the value for the Content-Type header for JSON
	ApplicationJSON = "application/json"
)

Variables

View Source
var (
	// JSContentTypeHeader is the http.Header for the "application/json" content type
	JSContentTypeHeader = http.Header(map[string][]string{ContentType: []string{ApplicationJSON}})
)

Functions

This section is empty.

Types

type Client

type Client interface {
	Do(method string, headers http.Header, body io.Reader, path ...string) (*http.Response, error)
}

Client is a REST client that makes requests to a given path. Implementations will prefix the path with a base URL that is specified when the client implementation is created

func NewRealTLSClient

func NewRealTLSClient(baseURL string) Client

NewRealTLSClient creates a new Client that uses a TLS connection to make requests to baseURL

Jump to

Keyboard shortcuts

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