pagination :knife: perigee
diff --git a/pagination/http.go b/pagination/http.go
index 1e108c8..cabcccd 100644
--- a/pagination/http.go
+++ b/pagination/http.go
@@ -7,7 +7,6 @@
"net/url"
"strings"
- "github.com/racker/perigee"
"github.com/rackspace/gophercloud"
)
@@ -19,7 +18,7 @@
// PageResultFrom parses an HTTP response as JSON and returns a PageResult containing the
// results, interpreting it as JSON if the content type indicates.
-func PageResultFrom(resp http.Response) (PageResult, error) {
+func PageResultFrom(resp *http.Response) (PageResult, error) {
var parsedBody interface{}
defer resp.Body.Close()
@@ -46,19 +45,10 @@
}, err
}
-// Request performs a Perigee request and extracts the http.Response from the result.
-func Request(client *gophercloud.ServiceClient, headers map[string]string, url string) (http.Response, error) {
- h := client.AuthenticatedHeaders()
- for key, value := range headers {
- h[key] = value
- }
-
- resp, err := perigee.Request("GET", url, perigee.Options{
- MoreHeaders: h,
+// Request performs an HTTP request and extracts the http.Response from the result.
+func Request(client *gophercloud.ServiceClient, headers map[string]string, url string) (*http.Response, error) {
+ return client.Request("GET", url, gophercloud.RequestOpts{
+ MoreHeaders: headers,
OkCodes: []int{200, 204},
})
- if err != nil {
- return http.Response{}, err
- }
- return resp.HttpResponse, nil
}