openstack/ :knife: perigee
diff --git a/openstack/identity/v3/tokens/requests.go b/openstack/identity/v3/tokens/requests.go
index 5ca1031..ff958c7 100644
--- a/openstack/identity/v3/tokens/requests.go
+++ b/openstack/identity/v3/tokens/requests.go
@@ -234,10 +234,10 @@
var result CreateResult
var response *perigee.Response
- response, result.Err = perigee.Request("POST", tokenURL(c), perigee.Options{
- ReqBody: &req,
- Results: &result.Body,
- OkCodes: []int{201},
+ response, result.Err = c.Request("POST", tokenURL(c), gophercloud.RequestOpts{
+ JSONBody: &req,
+ JSONResponse: &result.Body,
+ OkCodes: []int{201},
})
if result.Err != nil {
return result
@@ -250,10 +250,10 @@
func Get(c *gophercloud.ServiceClient, token string) GetResult {
var result GetResult
var response *perigee.Response
- response, result.Err = perigee.Request("GET", tokenURL(c), perigee.Options{
- MoreHeaders: subjectTokenHeaders(c, token),
- Results: &result.Body,
- OkCodes: []int{200, 203},
+ response, result.Err = c.Request("GET", tokenURL(c), gophercloud.RequestOpts{
+ MoreHeaders: subjectTokenHeaders(c, token),
+ JSONResponse: &result.Body,
+ OkCodes: []int{200, 203},
})
if result.Err != nil {
return result
@@ -264,7 +264,7 @@
// Validate determines if a specified token is valid or not.
func Validate(c *gophercloud.ServiceClient, token string) (bool, error) {
- response, err := perigee.Request("HEAD", tokenURL(c), perigee.Options{
+ response, err := c.Request("HEAD", tokenURL(c), gophercloud.RequestOpts{
MoreHeaders: subjectTokenHeaders(c, token),
OkCodes: []int{204, 404},
})
@@ -278,7 +278,7 @@
// Revoke immediately makes specified token invalid.
func Revoke(c *gophercloud.ServiceClient, token string) RevokeResult {
var res RevokeResult
- _, res.Err = perigee.Request("DELETE", tokenURL(c), perigee.Options{
+ _, res.Err = c.Request("DELETE", tokenURL(c), gophercloud.RequestOpts{
MoreHeaders: subjectTokenHeaders(c, token),
OkCodes: []int{204},
})