From 4366454fbe4a788c6f52e6c0b9f5cb72e9db0784 Mon Sep 17 00:00:00 2001 From: Davanum Srinivas Date: Mon, 13 Nov 2017 22:16:20 -0500 Subject: [PATCH] Update Gophercloud dependency for reauth problem Fixes picked up from gophercloud are: https://github.com/gophercloud/gophercloud/compare/443743e88335413103dcf1997e46d401b264fbcd...0b6b13c4dd9e07a89f83cbe4617c13ad646d6362 Including the one for endless loop on reauth: https://github.com/gophercloud/gophercloud/pull/604 --- Godeps/Godeps.json | 52 +++++++++---------- .../src/k8s.io/apiserver/Godeps/Godeps.json | 14 ++--- .../src/k8s.io/client-go/Godeps/Godeps.json | 14 ++--- .../gophercloud/gophercloud/.gitignore | 1 + .../gophercloud/gophercloud/.zuul.yaml | 12 +++++ .../gophercloud/openstack/client.go | 8 +++ .../openstack/compute/v2/flavors/doc.go | 18 +++++++ .../openstack/compute/v2/flavors/requests.go | 10 +++- .../openstack/compute/v2/flavors/results.go | 31 +++++++++++ .../openstack/compute/v2/flavors/urls.go | 4 ++ .../openstack/compute/v2/servers/results.go | 10 ++++ .../v2/extensions/layer3/routers/results.go | 1 + .../openstack/networking/v2/ports/results.go | 22 ++++---- .../gophercloud/pagination/pager.go | 1 - .../gophercloud/provider_client.go | 9 ++-- 15 files changed, 152 insertions(+), 55 deletions(-) create mode 100644 vendor/github.com/gophercloud/gophercloud/.zuul.yaml diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index f0078d93108..5b02ea8366b 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -1617,107 +1617,107 @@ }, { "ImportPath": "github.com/gophercloud/gophercloud", - "Rev": "443743e88335413103dcf1997e46d401b264fbcd" + "Rev": "0b6b13c4dd9e07a89f83cbe4617c13ad646d6362" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack", - "Rev": "443743e88335413103dcf1997e46d401b264fbcd" + "Rev": "0b6b13c4dd9e07a89f83cbe4617c13ad646d6362" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack/blockstorage/v1/volumes", - "Rev": "443743e88335413103dcf1997e46d401b264fbcd" + "Rev": "0b6b13c4dd9e07a89f83cbe4617c13ad646d6362" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack/blockstorage/v2/volumes", - "Rev": "443743e88335413103dcf1997e46d401b264fbcd" + "Rev": "0b6b13c4dd9e07a89f83cbe4617c13ad646d6362" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack/common/extensions", - "Rev": "443743e88335413103dcf1997e46d401b264fbcd" + "Rev": "0b6b13c4dd9e07a89f83cbe4617c13ad646d6362" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/attachinterfaces", - "Rev": "443743e88335413103dcf1997e46d401b264fbcd" + "Rev": "0b6b13c4dd9e07a89f83cbe4617c13ad646d6362" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/volumeattach", - "Rev": "443743e88335413103dcf1997e46d401b264fbcd" + "Rev": "0b6b13c4dd9e07a89f83cbe4617c13ad646d6362" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack/compute/v2/flavors", - "Rev": "443743e88335413103dcf1997e46d401b264fbcd" + "Rev": "0b6b13c4dd9e07a89f83cbe4617c13ad646d6362" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack/compute/v2/images", - "Rev": "443743e88335413103dcf1997e46d401b264fbcd" + "Rev": "0b6b13c4dd9e07a89f83cbe4617c13ad646d6362" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack/compute/v2/servers", - "Rev": "443743e88335413103dcf1997e46d401b264fbcd" + "Rev": "0b6b13c4dd9e07a89f83cbe4617c13ad646d6362" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack/identity/v2/tenants", - "Rev": "443743e88335413103dcf1997e46d401b264fbcd" + "Rev": "0b6b13c4dd9e07a89f83cbe4617c13ad646d6362" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack/identity/v2/tokens", - "Rev": "443743e88335413103dcf1997e46d401b264fbcd" + "Rev": "0b6b13c4dd9e07a89f83cbe4617c13ad646d6362" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack/identity/v3/extensions/trusts", - "Rev": "443743e88335413103dcf1997e46d401b264fbcd" + "Rev": "0b6b13c4dd9e07a89f83cbe4617c13ad646d6362" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack/identity/v3/tokens", - "Rev": "443743e88335413103dcf1997e46d401b264fbcd" + "Rev": "0b6b13c4dd9e07a89f83cbe4617c13ad646d6362" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions", - "Rev": "443743e88335413103dcf1997e46d401b264fbcd" + "Rev": "0b6b13c4dd9e07a89f83cbe4617c13ad646d6362" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/layer3/floatingips", - "Rev": "443743e88335413103dcf1997e46d401b264fbcd" + "Rev": "0b6b13c4dd9e07a89f83cbe4617c13ad646d6362" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/layer3/routers", - "Rev": "443743e88335413103dcf1997e46d401b264fbcd" + "Rev": "0b6b13c4dd9e07a89f83cbe4617c13ad646d6362" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/lbaas_v2/listeners", - "Rev": "443743e88335413103dcf1997e46d401b264fbcd" + "Rev": "0b6b13c4dd9e07a89f83cbe4617c13ad646d6362" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/lbaas_v2/loadbalancers", - "Rev": "443743e88335413103dcf1997e46d401b264fbcd" + "Rev": "0b6b13c4dd9e07a89f83cbe4617c13ad646d6362" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/lbaas_v2/monitors", - "Rev": "443743e88335413103dcf1997e46d401b264fbcd" + "Rev": "0b6b13c4dd9e07a89f83cbe4617c13ad646d6362" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/lbaas_v2/pools", - "Rev": "443743e88335413103dcf1997e46d401b264fbcd" + "Rev": "0b6b13c4dd9e07a89f83cbe4617c13ad646d6362" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/security/groups", - "Rev": "443743e88335413103dcf1997e46d401b264fbcd" + "Rev": "0b6b13c4dd9e07a89f83cbe4617c13ad646d6362" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/security/rules", - "Rev": "443743e88335413103dcf1997e46d401b264fbcd" + "Rev": "0b6b13c4dd9e07a89f83cbe4617c13ad646d6362" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack/networking/v2/ports", - "Rev": "443743e88335413103dcf1997e46d401b264fbcd" + "Rev": "0b6b13c4dd9e07a89f83cbe4617c13ad646d6362" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack/utils", - "Rev": "443743e88335413103dcf1997e46d401b264fbcd" + "Rev": "0b6b13c4dd9e07a89f83cbe4617c13ad646d6362" }, { "ImportPath": "github.com/gophercloud/gophercloud/pagination", - "Rev": "443743e88335413103dcf1997e46d401b264fbcd" + "Rev": "0b6b13c4dd9e07a89f83cbe4617c13ad646d6362" }, { "ImportPath": "github.com/gorilla/context", diff --git a/staging/src/k8s.io/apiserver/Godeps/Godeps.json b/staging/src/k8s.io/apiserver/Godeps/Godeps.json index 90a1cb3fb2a..2a73f617366 100644 --- a/staging/src/k8s.io/apiserver/Godeps/Godeps.json +++ b/staging/src/k8s.io/apiserver/Godeps/Godeps.json @@ -408,31 +408,31 @@ }, { "ImportPath": "github.com/gophercloud/gophercloud", - "Rev": "443743e88335413103dcf1997e46d401b264fbcd" + "Rev": "0b6b13c4dd9e07a89f83cbe4617c13ad646d6362" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack", - "Rev": "443743e88335413103dcf1997e46d401b264fbcd" + "Rev": "0b6b13c4dd9e07a89f83cbe4617c13ad646d6362" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack/identity/v2/tenants", - "Rev": "443743e88335413103dcf1997e46d401b264fbcd" + "Rev": "0b6b13c4dd9e07a89f83cbe4617c13ad646d6362" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack/identity/v2/tokens", - "Rev": "443743e88335413103dcf1997e46d401b264fbcd" + "Rev": "0b6b13c4dd9e07a89f83cbe4617c13ad646d6362" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack/identity/v3/tokens", - "Rev": "443743e88335413103dcf1997e46d401b264fbcd" + "Rev": "0b6b13c4dd9e07a89f83cbe4617c13ad646d6362" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack/utils", - "Rev": "443743e88335413103dcf1997e46d401b264fbcd" + "Rev": "0b6b13c4dd9e07a89f83cbe4617c13ad646d6362" }, { "ImportPath": "github.com/gophercloud/gophercloud/pagination", - "Rev": "443743e88335413103dcf1997e46d401b264fbcd" + "Rev": "0b6b13c4dd9e07a89f83cbe4617c13ad646d6362" }, { "ImportPath": "github.com/gregjones/httpcache", diff --git a/staging/src/k8s.io/client-go/Godeps/Godeps.json b/staging/src/k8s.io/client-go/Godeps/Godeps.json index 09f196fe512..f8519320974 100644 --- a/staging/src/k8s.io/client-go/Godeps/Godeps.json +++ b/staging/src/k8s.io/client-go/Godeps/Godeps.json @@ -172,31 +172,31 @@ }, { "ImportPath": "github.com/gophercloud/gophercloud", - "Rev": "443743e88335413103dcf1997e46d401b264fbcd" + "Rev": "0b6b13c4dd9e07a89f83cbe4617c13ad646d6362" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack", - "Rev": "443743e88335413103dcf1997e46d401b264fbcd" + "Rev": "0b6b13c4dd9e07a89f83cbe4617c13ad646d6362" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack/identity/v2/tenants", - "Rev": "443743e88335413103dcf1997e46d401b264fbcd" + "Rev": "0b6b13c4dd9e07a89f83cbe4617c13ad646d6362" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack/identity/v2/tokens", - "Rev": "443743e88335413103dcf1997e46d401b264fbcd" + "Rev": "0b6b13c4dd9e07a89f83cbe4617c13ad646d6362" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack/identity/v3/tokens", - "Rev": "443743e88335413103dcf1997e46d401b264fbcd" + "Rev": "0b6b13c4dd9e07a89f83cbe4617c13ad646d6362" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack/utils", - "Rev": "443743e88335413103dcf1997e46d401b264fbcd" + "Rev": "0b6b13c4dd9e07a89f83cbe4617c13ad646d6362" }, { "ImportPath": "github.com/gophercloud/gophercloud/pagination", - "Rev": "443743e88335413103dcf1997e46d401b264fbcd" + "Rev": "0b6b13c4dd9e07a89f83cbe4617c13ad646d6362" }, { "ImportPath": "github.com/gregjones/httpcache", diff --git a/vendor/github.com/gophercloud/gophercloud/.gitignore b/vendor/github.com/gophercloud/gophercloud/.gitignore index ead84456eb0..df9048a010a 100644 --- a/vendor/github.com/gophercloud/gophercloud/.gitignore +++ b/vendor/github.com/gophercloud/gophercloud/.gitignore @@ -1 +1,2 @@ **/*.swp +.idea diff --git a/vendor/github.com/gophercloud/gophercloud/.zuul.yaml b/vendor/github.com/gophercloud/gophercloud/.zuul.yaml new file mode 100644 index 00000000000..c259d03e184 --- /dev/null +++ b/vendor/github.com/gophercloud/gophercloud/.zuul.yaml @@ -0,0 +1,12 @@ +- project: + name: gophercloud/gophercloud + check: + jobs: + - gophercloud-unittest + - gophercloud-acceptance-test + recheck-mitaka: + jobs: + - gophercloud-acceptance-test-mitaka + recheck-pike: + jobs: + - gophercloud-acceptance-test-pike diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/client.go b/vendor/github.com/gophercloud/gophercloud/openstack/client.go index 77214caca3b..adcf90bcef1 100644 --- a/vendor/github.com/gophercloud/gophercloud/openstack/client.go +++ b/vendor/github.com/gophercloud/gophercloud/openstack/client.go @@ -346,3 +346,11 @@ func NewImageServiceV2(client *gophercloud.ProviderClient, eo gophercloud.Endpoi sc.ResourceBase = sc.Endpoint + "v2/" return sc, err } + +// NewLoadBalancerV2 creates a ServiceClient that may be used to access the v2 +// load balancer service. +func NewLoadBalancerV2(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error) { + sc, err := initClientOpts(client, eo, "load-balancer") + sc.ResourceBase = sc.Endpoint + "v2.0/" + return sc, err +} diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/flavors/doc.go b/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/flavors/doc.go index 2661cfac209..a7bc15c3e5c 100644 --- a/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/flavors/doc.go +++ b/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/flavors/doc.go @@ -41,5 +41,23 @@ Example to Create a Flavor if err != nil { panic(err) } + +Example to List Flavor Access + + flavorID := "e91758d6-a54a-4778-ad72-0c73a1cb695b" + + allPages, err := flavors.ListAccesses(computeClient, flavorID).AllPages() + if err != nil { + panic(err) + } + + allAccesses, err := flavors.ExtractAccesses(allPages) + if err != nil { + panic(err) + } + + for _, access := range allAccesses { + fmt.Printf("%+v", access) + } */ package flavors diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/flavors/requests.go b/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/flavors/requests.go index 317fd8530c3..6eb3678b2bd 100644 --- a/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/flavors/requests.go +++ b/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/flavors/requests.go @@ -43,7 +43,6 @@ const ( the Marker for the current call. */ type ListOpts struct { - // ChangesSince, if provided, instructs List to return only those things which // have changed since the timestamp provided. ChangesSince string `q:"changes-since"` @@ -154,6 +153,15 @@ func Delete(client *gophercloud.ServiceClient, id string) (r DeleteResult) { return } +// ListAccesses retrieves the tenants which have access to a flavor. +func ListAccesses(client *gophercloud.ServiceClient, id string) pagination.Pager { + url := accessURL(client, id) + + return pagination.NewPager(client, url, func(r pagination.PageResult) pagination.Page { + return AccessPage{pagination.SinglePageBase(r)} + }) +} + // IDFromName is a convienience function that returns a flavor's ID given its // name. func IDFromName(client *gophercloud.ServiceClient, name string) (string, error) { diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/flavors/results.go b/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/flavors/results.go index fda11d3e06a..47d58ccfb36 100644 --- a/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/flavors/results.go +++ b/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/flavors/results.go @@ -12,6 +12,8 @@ type commonResult struct { gophercloud.Result } +// CreateResult is the response of a Get operations. Call its Extract method to +// interpret it as a Flavor. type CreateResult struct { commonResult } @@ -131,3 +133,32 @@ func ExtractFlavors(r pagination.Page) ([]Flavor, error) { err := (r.(FlavorPage)).ExtractInto(&s) return s.Flavors, err } + +// AccessPage contains a single page of all FlavorAccess entries for a flavor. +type AccessPage struct { + pagination.SinglePageBase +} + +// IsEmpty indicates whether an AccessPage is empty. +func (page AccessPage) IsEmpty() (bool, error) { + v, err := ExtractAccesses(page) + return len(v) == 0, err +} + +// ExtractAccesses interprets a page of results as a slice of FlavorAccess. +func ExtractAccesses(r pagination.Page) ([]FlavorAccess, error) { + var s struct { + FlavorAccesses []FlavorAccess `json:"flavor_access"` + } + err := (r.(AccessPage)).ExtractInto(&s) + return s.FlavorAccesses, err +} + +// FlavorAccess represents an ACL of tenant access to a specific Flavor. +type FlavorAccess struct { + // FlavorID is the unique ID of the flavor. + FlavorID string `json:"flavor_id"` + + // TenantID is the unique ID of the tenant. + TenantID string `json:"tenant_id"` +} diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/flavors/urls.go b/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/flavors/urls.go index 518d05b3699..04d33bf1279 100644 --- a/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/flavors/urls.go +++ b/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/flavors/urls.go @@ -19,3 +19,7 @@ func createURL(client *gophercloud.ServiceClient) string { func deleteURL(client *gophercloud.ServiceClient, id string) string { return client.ServiceURL("flavors", id) } + +func accessURL(client *gophercloud.ServiceClient, id string) string { + return client.ServiceURL("flavors", id, "os-flavor-access") +} diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/servers/results.go b/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/servers/results.go index 7ef80e92e2e..c6c1ff43f7b 100644 --- a/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/servers/results.go +++ b/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/servers/results.go @@ -211,6 +211,16 @@ type Server struct { // SecurityGroups includes the security groups that this instance has applied // to it. SecurityGroups []map[string]interface{} `json:"security_groups"` + + // Fault contains failure information about a server. + Fault Fault `json:"fault"` +} + +type Fault struct { + Code int `json:"code"` + Created time.Time `json:"created"` + Details string `json:"details"` + Message string `json:"message"` } func (r *Server) UnmarshalJSON(b []byte) error { diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/layer3/routers/results.go b/vendor/github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/layer3/routers/results.go index e7c27dc332e..e19c8e74c47 100644 --- a/vendor/github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/layer3/routers/results.go +++ b/vendor/github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/layer3/routers/results.go @@ -9,6 +9,7 @@ import ( // particular network router. type GatewayInfo struct { NetworkID string `json:"network_id"` + EnableSNAT *bool `json:"enable_snat,omitempty"` ExternalFixedIPs []ExternalFixedIP `json:"external_fixed_ips,omitempty"` } diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/networking/v2/ports/results.go b/vendor/github.com/gophercloud/gophercloud/openstack/networking/v2/ports/results.go index c50da6dfffd..ebef98d5de0 100644 --- a/vendor/github.com/gophercloud/gophercloud/openstack/networking/v2/ports/results.go +++ b/vendor/github.com/gophercloud/gophercloud/openstack/networking/v2/ports/results.go @@ -11,11 +11,13 @@ type commonResult struct { // Extract is a function that accepts a result and extracts a port resource. func (r commonResult) Extract() (*Port, error) { - var s struct { - Port *Port `json:"port"` - } + var s Port err := r.ExtractInto(&s) - return s.Port, err + return &s, err +} + +func (r commonResult) ExtractInto(v interface{}) error { + return r.Result.ExtractIntoStructPtr(v, "port") } // CreateResult represents the result of a create operation. Call its Extract @@ -128,9 +130,11 @@ func (r PortPage) IsEmpty() (bool, error) { // and extracts the elements into a slice of Port structs. In other words, // a generic collection is mapped into a relevant slice. func ExtractPorts(r pagination.Page) ([]Port, error) { - var s struct { - Ports []Port `json:"ports"` - } - err := (r.(PortPage)).ExtractInto(&s) - return s.Ports, err + var s []Port + err := ExtractPortsInto(r, &s) + return s, err +} + +func ExtractPortsInto(r pagination.Page, v interface{}) error { + return r.(PortPage).Result.ExtractIntoSlicePtr(v, "ports") } diff --git a/vendor/github.com/gophercloud/gophercloud/pagination/pager.go b/vendor/github.com/gophercloud/gophercloud/pagination/pager.go index 6f1609ef2e3..7c65926b725 100644 --- a/vendor/github.com/gophercloud/gophercloud/pagination/pager.go +++ b/vendor/github.com/gophercloud/gophercloud/pagination/pager.go @@ -22,7 +22,6 @@ var ( // Depending on the pagination strategy of a particular resource, there may be an additional subinterface that the result type // will need to implement. type Page interface { - // NextPageURL generates the URL for the page of data that follows this collection. // Return "" if no such page exists. NextPageURL() (string, error) diff --git a/vendor/github.com/gophercloud/gophercloud/provider_client.go b/vendor/github.com/gophercloud/gophercloud/provider_client.go index f88682381dd..01b3010739a 100644 --- a/vendor/github.com/gophercloud/gophercloud/provider_client.go +++ b/vendor/github.com/gophercloud/gophercloud/provider_client.go @@ -145,10 +145,6 @@ func (client *ProviderClient) Request(method, url string, options *RequestOpts) } req.Header.Set("Accept", applicationJSON) - for k, v := range client.AuthenticatedHeaders() { - req.Header.Add(k, v) - } - // Set the User-Agent header req.Header.Set("User-Agent", client.UserAgent.Join()) @@ -162,6 +158,11 @@ func (client *ProviderClient) Request(method, url string, options *RequestOpts) } } + // get latest token from client + for k, v := range client.AuthenticatedHeaders() { + req.Header.Set(k, v) + } + // Set connection parameter to close the connection immediately when we've got the response req.Close = true