openstack/cdn :knife: perigee
diff --git a/openstack/cdn/v1/base/requests.go b/openstack/cdn/v1/base/requests.go
index 9d8632c..b63dc95 100644
--- a/openstack/cdn/v1/base/requests.go
+++ b/openstack/cdn/v1/base/requests.go
@@ -1,19 +1,14 @@
package base
-import (
- "github.com/rackspace/gophercloud"
-
- "github.com/racker/perigee"
-)
+import "github.com/rackspace/gophercloud"
// Get retrieves the home document, allowing the user to discover the
// entire API.
func Get(c *gophercloud.ServiceClient) GetResult {
var res GetResult
- _, res.Err = perigee.Request("GET", getURL(c), perigee.Options{
- MoreHeaders: c.AuthenticatedHeaders(),
- Results: &res.Body,
- OkCodes: []int{200},
+ _, res.Err = c.Request("GET", getURL(c), gophercloud.RequestOpts{
+ JSONResponse: &res.Body,
+ OkCodes: []int{200},
})
return res
}
@@ -21,10 +16,9 @@
// Ping retrieves a ping to the server.
func Ping(c *gophercloud.ServiceClient) PingResult {
var res PingResult
- _, res.Err = perigee.Request("GET", pingURL(c), perigee.Options{
- MoreHeaders: c.AuthenticatedHeaders(),
+ _, res.Err = c.Request("GET", pingURL(c), gophercloud.RequestOpts{
OkCodes: []int{204},
- OmitAccept: true,
+ MoreHeaders: map[string]string{"Accept": ""},
})
return res
}
diff --git a/openstack/cdn/v1/serviceassets/requests.go b/openstack/cdn/v1/serviceassets/requests.go
index 5248ef2..a80aa0d 100644
--- a/openstack/cdn/v1/serviceassets/requests.go
+++ b/openstack/cdn/v1/serviceassets/requests.go
@@ -3,7 +3,6 @@
import (
"strings"
- "github.com/racker/perigee"
"github.com/rackspace/gophercloud"
)
@@ -44,9 +43,8 @@
}
var res DeleteResult
- _, res.Err = perigee.Request("DELETE", url, perigee.Options{
- MoreHeaders: c.AuthenticatedHeaders(),
- OkCodes: []int{202},
+ _, res.Err = c.Request("DELETE", url, gophercloud.RequestOpts{
+ OkCodes: []int{202},
})
return res
}
diff --git a/openstack/cdn/v1/services/requests.go b/openstack/cdn/v1/services/requests.go
index ad1e1da..e65ad02 100644
--- a/openstack/cdn/v1/services/requests.go
+++ b/openstack/cdn/v1/services/requests.go
@@ -201,10 +201,9 @@
}
var res GetResult
- _, res.Err = perigee.Request("GET", url, perigee.Options{
- MoreHeaders: c.AuthenticatedHeaders(),
- Results: &res.Body,
- OkCodes: []int{200},
+ _, res.Err = c.Request("GET", url, gophercloud.RequestOpts{
+ JSONResponse: &res.Body,
+ OkCodes: []int{200},
})
return res
}
@@ -383,9 +382,8 @@
}
var res DeleteResult
- _, res.Err = perigee.Request("DELETE", url, perigee.Options{
- MoreHeaders: c.AuthenticatedHeaders(),
- OkCodes: []int{202},
+ _, res.Err = c.Request("DELETE", url, gophercloud.RequestOpts{
+ OkCodes: []int{202},
})
return res
}