themekit: github.com/Shopify/themekit/src/httpify Index | Files

package httpify

import "github.com/Shopify/themekit/src/httpify"

Index

Package Files

client.go

type HTTPClient Uses

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

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

func NewClient Uses

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

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

func (*HTTPClient) Delete Uses

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

Delete will send a delete request to the path provided

func (*HTTPClient) Get Uses

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

Get will send a get request to the path provided

func (*HTTPClient) Post Uses

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 Uses

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 Uses

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

Params allows for a better structured input into NewClient

Package httpify imports 14 packages (graph) and is imported by 1 packages. Updated 2018-08-20. Refresh now. Tools for package owners.