Skip to content

Commit

Permalink
we can retrieve the hosts list from /api/v0/hosts
Browse files Browse the repository at this point in the history
  • Loading branch information
itchyny committed Jul 8, 2016
1 parent 8dcf89c commit 068671c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion hosts.go
Expand Up @@ -176,7 +176,7 @@ func (c *Client) FindHosts(param *FindHostsParam) ([]*Host, error) {
v.Set("customIdentifier", param.CustomIdentifier)
}

req, err := http.NewRequest("GET", fmt.Sprintf("%s?%s", c.urlFor("/api/v0/hosts.json").String(), v.Encode()), nil)
req, err := http.NewRequest("GET", fmt.Sprintf("%s?%s", c.urlFor("/api/v0/hosts").String(), v.Encode()), nil)
if err != nil {
return nil, err
}
Expand Down
4 changes: 2 additions & 2 deletions hosts_test.go
Expand Up @@ -71,8 +71,8 @@ func TestFindHost(t *testing.T) {

func TestFindHosts(t *testing.T) {
ts := httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) {
if req.URL.Path != "/api/v0/hosts.json" {
t.Error("request URL should be /api/v0/hosts.json but :", req.URL.Path)
if req.URL.Path != "/api/v0/hosts" {
t.Error("request URL should be /api/v0/hosts but :", req.URL.Path)
}

query := req.URL.Query()
Expand Down

0 comments on commit 068671c

Please sign in to comment.