func (api *API) PostJSON(path string, data interface{}) (body []byte, statusCode int, err error) {
	b, err := json.Marshal(data)
	if err != nil {
		return nil, 0, err
	}

	return api.PostReader(path, bytes.NewBuffer(b))
}
// PostJSON posts JSON to API
PostJSON posts JSON to API
// PostJSON posts JSON to API
func (api *API) PostJSON(path string, data interface{}) (body []byte, statusCode int, err error) {
	b, err := json.Marshal(data)
	if err != nil {
		return nil, 0, err
	}
	return api.PostReader(path, bytes.NewBuffer(b))
}
func ( api * API ) PostJSON ( path string , data interface { } ) ( body [ ] byte , statusCode int , err error ) { b , err := json . Marshal ( data ) if err != nil { return nil , 0 , err } return api . PostReader ( path , bytes . NewBuffer ( b ) ) }
PostJSON posts JSON to API
PostJSON posts JSON to API