diff --git a/openstack/storage/v1/objects/objects.go b/openstack/storage/v1/objects/objects.go
index a4fbd8c..4cf3d2d 100644
--- a/openstack/storage/v1/objects/objects.go
+++ b/openstack/storage/v1/objects/objects.go
@@ -1,10 +1,12 @@
 package objects
 
 import (
-	"encoding/json"
+	"fmt"
 	"io"
 	"io/ioutil"
 	"strings"
+
+	"github.com/rackspace/gophercloud/pagination"
 )
 
 // Object is a structure that holds information related to a storage object.
@@ -69,32 +71,47 @@
 	Headers   map[string]string
 }
 
-// ExtractInfo is a function that takes a ListResult (of type *http.Response)
-// and returns the objects' information.
-func ExtractInfo(lr ListResult) ([]Object, error) {
-	var oi []Object
-	defer lr.Body.Close()
-	body, err := ioutil.ReadAll(lr.Body)
-	if err != nil {
-		return oi, err
+// ExtractInfo is a function that takes a page of objects and returns their full information.
+func ExtractInfo(page pagination.Page) ([]Object, error) {
+	untyped := page.(ListResult).Body.([]interface{})
+	results := make([]Object, len(untyped))
+	for index, each := range untyped {
+		results[index] = Object(each.(map[string]interface{}))
 	}
-	err = json.Unmarshal(body, &oi)
-	return oi, err
+	return results, nil
 }
 
-// ExtractNames is a function that takes a ListResult (of type *http.Response)
-// and returns the objects' names.
-func ExtractNames(lr ListResult) ([]string, error) {
-	var ons []string
-	defer lr.Body.Close()
-	body, err := ioutil.ReadAll(lr.Body)
-	if err != nil {
-		return ons, err
+// ExtractNames is a function that takes a page of objects and returns only their names.
+func ExtractNames(page pagination.Page) ([]string, error) {
+	casted := page.(ListResult)
+	ct := casted.Header.Get("Content-Type")
+
+	switch {
+	case strings.HasPrefix(ct, "application/json"):
+		parsed, err := ExtractInfo(page)
+		if err != nil {
+			return nil, err
+		}
+
+		names := make([]string, 0, len(parsed))
+		for _, object := range parsed {
+			names = append(names, object["name"].(string))
+		}
+		return names, nil
+	case strings.HasPrefix(ct, "text/plain"):
+		names := make([]string, 0, 50)
+
+		body := string(page.(ListResult).Body.([]uint8))
+		for _, name := range strings.Split(body, "\n") {
+			if len(name) > 0 {
+				names = append(names, name)
+			}
+		}
+
+		return names, nil
+	default:
+		return nil, fmt.Errorf("Cannot extract names from response with content-type: [%s]", ct)
 	}
-	jr := string(body)
-	ons = strings.Split(jr, "\n")
-	ons = ons[:len(ons)-1]
-	return ons, nil
 }
 
 // ExtractContent is a function that takes a DownloadResult (of type *http.Response)
diff --git a/openstack/storage/v1/objects/requests.go b/openstack/storage/v1/objects/requests.go
index 931653e..67aba34 100644
--- a/openstack/storage/v1/objects/requests.go
+++ b/openstack/storage/v1/objects/requests.go
@@ -7,10 +7,34 @@
 	"github.com/racker/perigee"
 	"github.com/rackspace/gophercloud"
 	"github.com/rackspace/gophercloud/openstack/utils"
+	"github.com/rackspace/gophercloud/pagination"
 )
 
-// ListResult is a *http.Response that is returned from a call to the List function.
-type ListResult *http.Response
+// ListResult is a single page of objects that is returned from a call to the List function.
+type ListResult struct {
+	pagination.MarkerPageBase
+}
+
+// IsEmpty returns true if a ListResult contains no object names.
+func (r ListResult) IsEmpty() (bool, error) {
+	names, err := ExtractNames(r)
+	if err != nil {
+		return true, err
+	}
+	return len(names) == 0, nil
+}
+
+// LastMarker returns the last object name in a ListResult.
+func (r ListResult) LastMarker() (string, error) {
+	names, err := ExtractNames(r)
+	if err != nil {
+		return "", err
+	}
+	if len(names) == 0 {
+		return "", nil
+	}
+	return names[len(names)-1], nil
+}
 
 // DownloadResult is a *http.Response that is returned from a call to the Download function.
 type DownloadResult *http.Response
@@ -21,24 +45,25 @@
 // List is a function that retrieves all objects in a container. It also returns the details
 // for the container. To extract only the object information or names, pass the ListResult
 // response to the ExtractInfo or ExtractNames function, respectively.
-func List(c *gophercloud.ServiceClient, opts ListOpts) (ListResult, error) {
-	contentType := ""
-
-	h := c.Provider.AuthenticatedHeaders()
+func List(c *gophercloud.ServiceClient, opts ListOpts) pagination.Pager {
+	var headers map[string]string
 
 	query := utils.BuildQuery(opts.Params)
 
 	if !opts.Full {
-		contentType = "text/plain"
+		headers = map[string]string{"Content-Type": "text/plain"}
+	}
+
+	createPage := func(r pagination.LastHTTPResponse) pagination.Page {
+		p := ListResult{pagination.MarkerPageBase{LastHTTPResponse: r}}
+		p.MarkerPageBase.Owner = p
+		return p
 	}
 
 	url := getContainerURL(c, opts.Container) + query
-	resp, err := perigee.Request("GET", url, perigee.Options{
-		MoreHeaders: h,
-		Accept:      contentType,
-		OkCodes:     []int{200, 204},
-	})
-	return &resp.HttpResponse, err
+	pager := pagination.NewPager(c, url, createPage)
+	pager.Headers = headers
+	return pager
 }
 
 // Download is a function that retrieves the content and metadata for an object.
