mbhttp

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package mbhttp provides helpers common across all SDKs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {

	// HTTPClient is the underlying http.Client that will be
	// used to make requests.
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

Client makes requests and handles common Machine Box error cases.

func New

func New(boxname string, client *http.Client) *Client

New makes a new Client.

func (*Client) DoUnmarshal added in v0.3.1

func (c *Client) DoUnmarshal(req *http.Request, v interface{}) (*http.Response, error)

DoUnmarshal makes the request and unmarshals the response into v. The Body in the Response will be closed after calling this method.

Jump to

Keyboard shortcuts

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