Converting Rackspace services to new HTTP methods
diff --git a/rackspace/lb/v1/throttle/requests.go b/rackspace/lb/v1/throttle/requests.go
index 2680a89..0446b97 100644
--- a/rackspace/lb/v1/throttle/requests.go
+++ b/rackspace/lb/v1/throttle/requests.go
@@ -55,12 +55,7 @@
return res
}
- _, res.Err = c.Request("PUT", rootURL(c, lbID), gophercloud.RequestOpts{
- JSONBody: &reqBody,
- JSONResponse: &res.Body,
- OkCodes: []int{202},
- })
-
+ _, res.Err = c.Put(rootURL(c, lbID), reqBody, &res.Body, nil)
return res
}
@@ -68,12 +63,7 @@
// throttling configuration for a load balancer.
func Get(c *gophercloud.ServiceClient, lbID int) GetResult {
var res GetResult
-
- _, res.Err = c.Request("GET", rootURL(c, lbID), gophercloud.RequestOpts{
- JSONResponse: &res.Body,
- OkCodes: []int{200},
- })
-
+ _, res.Err = c.Get(rootURL(c, lbID), &res.Body, nil)
return res
}
@@ -81,10 +71,6 @@
// configuration for a load balancer.
func Delete(c *gophercloud.ServiceClient, lbID int) DeleteResult {
var res DeleteResult
-
- _, res.Err = c.Request("DELETE", rootURL(c, lbID), gophercloud.RequestOpts{
- OkCodes: []int{202},
- })
-
+ _, res.Err = c.Delete(rootURL(c, lbID), nil)
return res
}