httpify

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2018 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPClient

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

HTTPClient encapsulates an authenticate http client to issue theme requests to Shopify

func NewClient

func NewClient(params Params) (*HTTPClient, error)

NewClient will create a new authenticated http client that will communicate with Shopify

func (*HTTPClient) Delete

func (client *HTTPClient) Delete(path string) (*http.Response, error)

Delete will send a delete request to the path provided

func (*HTTPClient) Get

func (client *HTTPClient) Get(path string) (*http.Response, error)

Get will send a get request to the path provided

func (*HTTPClient) Post

func (client *HTTPClient) Post(path string, body interface{}) (*http.Response, error)

Post will send a Post request to the path provided and set the post body as the object passed

func (*HTTPClient) Put

func (client *HTTPClient) Put(path string, body interface{}) (*http.Response, error)

Put will send a Put request to the path provided and set the post body as the object passed

type Params

type Params struct {
	Domain   string
	Password string
	Proxy    string
	Timeout  time.Duration
	APILimit time.Duration
}

Params allows for a better structured input into NewClient

Jump to

Keyboard shortcuts

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