Allow implementation code to specify headers.
diff --git a/pagination/pager.go b/pagination/pager.go
index 52ebb96..806d98a 100644
--- a/pagination/pager.go
+++ b/pagination/pager.go
@@ -34,6 +34,9 @@
client *gophercloud.ServiceClient
createPage func(r LastHTTPResponse) Page
+
+ // Headers supplies additional HTTP headers to populate on each paged request.
+ Headers map[string]string
}
// NewPager constructs a manually-configured pager.
@@ -47,7 +50,7 @@
}
func (p Pager) fetchNextPage(url string) (Page, error) {
- resp, err := Request(p.client, url)
+ resp, err := Request(p.client, p.Headers, url)
if err != nil {
return nil, err
}