func (c *Client) Get(path string, result interface{}) error {
	req, err := http.NewRequest("GET", "", nil)
	if err != nil {
		return errgo.Notef(err, "cannot make new request")
	}
	resp, err := c.Do(req, path)
	if err != nil {
		return errgo.Mask(err, isAPIError)
	}
	defer resp.Body.Close()
	// Parse the response.
	if err := httprequest.UnmarshalJSONResponse(resp, result); err != nil {
		return errgo.Notef(err, "cannot unmarshal response")
	}
	return nil
}
// Get makes a GET request to the given path in the charm store (not
// including the host name or version prefix but including a leading /),
// parsing the result as JSON into the given result value, which should
// be a pointer to the expected data, but may be nil if no result is
// desired.
Get makes a GET request to the given path in the charm store (not
including the host name or version prefix but including a leading /),
parsing the result as JSON into the given result value, which should
be a pointer to the expected data, but may be nil if no result is
desired.
// Get makes a GET request to the given path in the charm store ( not // including the host name or version prefix but including a leading / ) // parsing the result as JSON into the given result value which should // be a pointer to the expected data but may be nil if no result is // desired .
func (c *Client) Get(path string, result interface{}) error {
	req, err := http.NewRequest("GET", "", nil)
	if err != nil {
		return errgo.Notef(err, "cannot make new request")
	}
	resp, err := c.Do(req, path)
	if err != nil {
		return errgo.Mask(err, isAPIError)
	}
	defer resp.Body.Close()
	if err := httprequest.UnmarshalJSONResponse(resp, result); err != nil {
		return errgo.Notef(err, "cannot unmarshal response")
	}
	return nil
}
func ( c * Client ) Get ( path string , result interface { } ) error { req , err := http . NewRequest ( " " , " " , nil ) if err != nil { return errgo . Notef ( err , " " ) } resp , err := c . Do ( req , path ) if err != nil { return errgo . Mask ( err , isAPIError ) } defer resp . Body . Close ( ) if err := httprequest . UnmarshalJSONResponse ( resp , result ) ; err != nil { return errgo . Notef ( err , " " ) } return nil }
Get makes a GET request to the given path in the charm store (not
including the host name or version prefix but including a leading /),
parsing the result as JSON into the given result value, which should
be a pointer to the expected data, but may be nil if no result is
desired.
Get makes a GET request to the given path in the charm store ( not including the host name or version prefix but including a leading / ) parsing the result as JSON into the given result value which should be a pointer to the expected data but may be nil if no result is desired .
// Parse the response.