restclient

package
v0.0.0-...-47be27c Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2016 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DebugRequest

func DebugRequest(request *http.Request)

func DebugResponse

func DebugResponse(response *http.Response)

func RegisterClient

func RegisterClient(client Client)

Types

type Client

type Client interface {
	BaseURL() string
	Debug() bool
	HttpClient() *http.Client
}

Client provides the RequestBuilder with a configured http.Client object. In addition to a http.Client, RequestBuilder can also utilize relative API URLs when the base URL is present. Debugging requests and responses can be made possible by enabling the Debug mode to true.

func GetClient

func GetClient() Client

func NewDefaultClient

func NewDefaultClient(baseURL string, debug bool, client *http.Client) Client

type ClientManager

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

type DefaultClient

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

func (*DefaultClient) BaseURL

func (c *DefaultClient) BaseURL() string

func (*DefaultClient) Debug

func (c *DefaultClient) Debug() bool

func (*DefaultClient) HttpClient

func (c *DefaultClient) HttpClient() *http.Client

Jump to

Keyboard shortcuts

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