more error types; RequestOptsBuilder error fixes
diff --git a/openstack/objectstorage/v1/accounts/requests.go b/openstack/objectstorage/v1/accounts/requests.go
index 57d6a6d..f50cf97 100644
--- a/openstack/objectstorage/v1/accounts/requests.go
+++ b/openstack/objectstorage/v1/accounts/requests.go
@@ -39,7 +39,7 @@
}
}
- resp, err := c.Request("HEAD", getURL(c), gophercloud.RequestOpts{
+ resp, err := c.Request("HEAD", getURL(c), &gophercloud.RequestOpts{
MoreHeaders: h,
OkCodes: []int{204},
})
@@ -95,7 +95,7 @@
}
}
- resp, err := c.Request("POST", updateURL(c), gophercloud.RequestOpts{
+ resp, err := c.Request("POST", updateURL(c), &gophercloud.RequestOpts{
MoreHeaders: h,
OkCodes: []int{201, 202, 204},
})
diff --git a/openstack/objectstorage/v1/containers/requests.go b/openstack/objectstorage/v1/containers/requests.go
index c20d009..b2160c3 100644
--- a/openstack/objectstorage/v1/containers/requests.go
+++ b/openstack/objectstorage/v1/containers/requests.go
@@ -110,7 +110,7 @@
}
}
- resp, err := c.Request("PUT", createURL(c, containerName), gophercloud.RequestOpts{
+ resp, err := c.Request("PUT", createURL(c, containerName), &gophercloud.RequestOpts{
MoreHeaders: h,
OkCodes: []int{201, 202, 204},
})
@@ -178,7 +178,7 @@
}
}
- resp, err := c.Request("POST", updateURL(c, containerName), gophercloud.RequestOpts{
+ resp, err := c.Request("POST", updateURL(c, containerName), &gophercloud.RequestOpts{
MoreHeaders: h,
OkCodes: []int{201, 202, 204},
})
@@ -194,7 +194,7 @@
// function.
func Get(c *gophercloud.ServiceClient, containerName string) GetResult {
var res GetResult
- resp, err := c.Request("HEAD", getURL(c, containerName), gophercloud.RequestOpts{
+ resp, err := c.Request("HEAD", getURL(c, containerName), &gophercloud.RequestOpts{
OkCodes: []int{200, 204},
})
if resp != nil {
diff --git a/openstack/objectstorage/v1/objects/requests.go b/openstack/objectstorage/v1/objects/requests.go
index a2c1f85..9a6da58 100644
--- a/openstack/objectstorage/v1/objects/requests.go
+++ b/openstack/objectstorage/v1/objects/requests.go
@@ -133,7 +133,7 @@
url += query
}
- resp, err := c.Request("GET", url, gophercloud.RequestOpts{
+ resp, err := c.Request("GET", url, &gophercloud.RequestOpts{
MoreHeaders: h,
OkCodes: []int{200, 304},
})
@@ -226,7 +226,7 @@
return res
}
- ropts := gophercloud.RequestOpts{
+ ropts := &gophercloud.RequestOpts{
RawBody: content,
MoreHeaders: h,
}
@@ -295,7 +295,7 @@
}
url := copyURL(c, containerName, objectName)
- resp, err := c.Request("COPY", url, gophercloud.RequestOpts{
+ resp, err := c.Request("COPY", url, &gophercloud.RequestOpts{
MoreHeaders: h,
OkCodes: []int{201},
})
@@ -384,7 +384,7 @@
url += query
}
- resp, err := c.Request("HEAD", url, gophercloud.RequestOpts{
+ resp, err := c.Request("HEAD", url, &gophercloud.RequestOpts{
OkCodes: []int{200, 204},
})
if resp != nil {
@@ -442,7 +442,7 @@
}
url := updateURL(c, containerName, objectName)
- resp, err := c.Request("POST", url, gophercloud.RequestOpts{
+ resp, err := c.Request("POST", url, &gophercloud.RequestOpts{
MoreHeaders: h,
})
if resp != nil {