Use the ServiceClient to generate URLs.
Add OkCodes to all of the perigee requests.
diff --git a/openstack/storage/v1/accounts/requests.go b/openstack/storage/v1/accounts/requests.go
index 3ffc5f7..d5b623a 100644
--- a/openstack/storage/v1/accounts/requests.go
+++ b/openstack/storage/v1/accounts/requests.go
@@ -22,9 +22,9 @@
h["X-Account-Meta-"+k] = v
}
- url := c.GetAccountURL()
- _, err = perigee.Request("POST", url, perigee.Options{
+ _, err := perigee.Request("POST", getAccountURL(c), perigee.Options{
MoreHeaders: h,
+ OkCodes: []int{204},
})
return err
}
@@ -38,9 +38,9 @@
h[k] = v
}
- url := c.GetAccountURL()
- resp, err := perigee.Request("HEAD", url, perigee.Options{
+ resp, err := perigee.Request("HEAD", getAccountURL(c), perigee.Options{
MoreHeaders: h,
+ OkCodes: []int{204},
})
return &resp.HttpResponse, err
}