client

package
v0.0.0-...-6a46f16 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2013 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsHttpSuccess

func IsHttpSuccess(code int) bool

func NewRequest

func NewRequest(method string, url string, params interface{}) (*http.Request, error)

NewRequest is wrapper over http.NewRequest handling json encoding for params.

func Post

func Post(url string, params interface{}, response interface{}) error

Post is a version of http.Post accepting JSON params and returning the same.

Types

type Client

type Client http.Client
var DefaultClient *Client

func (*Client) DoRequest

func (c *Client) DoRequest(req *http.Request, response interface{}) error

DoRequest a wrapper over Do handling json encoding

Jump to

Keyboard shortcuts

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