Converting Rackspace services to new HTTP methods
diff --git a/rackspace/lb/v1/monitors/requests.go b/rackspace/lb/v1/monitors/requests.go
index 917282c..d4ba276 100644
--- a/rackspace/lb/v1/monitors/requests.go
+++ b/rackspace/lb/v1/monitors/requests.go
@@ -141,33 +141,20 @@
return res
}
- _, res.Err = c.Request("PUT", rootURL(c, id), gophercloud.RequestOpts{
- JSONBody: &reqBody,
- OkCodes: []int{202},
- })
-
+ _, res.Err = c.Put(rootURL(c, id), reqBody, nil, nil)
return res
}
// Get is the operation responsible for showing details of a health monitor.
func Get(c *gophercloud.ServiceClient, id int) GetResult {
var res GetResult
-
- _, res.Err = c.Request("GET", rootURL(c, id), gophercloud.RequestOpts{
- JSONResponse: &res.Body,
- OkCodes: []int{200},
- })
-
+ _, res.Err = c.Get(rootURL(c, id), &res.Body, nil)
return res
}
// Delete is the operation responsible for deleting a health monitor.
func Delete(c *gophercloud.ServiceClient, id int) DeleteResult {
var res DeleteResult
-
- _, res.Err = c.Request("DELETE", rootURL(c, id), gophercloud.RequestOpts{
- OkCodes: []int{202},
- })
-
+ _, res.Err = c.Delete(rootURL(c, id), nil)
return res
}