summaryrefslogtreecommitdiff
path: root/pkg/bindings/connection.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-02-22 10:52:55 -0500
committerGitHub <noreply@github.com>2020-02-22 10:52:55 -0500
commit2850ec5f507ee6c3202f09e099b01a4e550ef0d9 (patch)
tree7af4fcba3fec116c025c4d2ab22c83048672a952 /pkg/bindings/connection.go
parent822bf70e454126475e32034b3ce3c660752b99ad (diff)
parentf0df07b5931b256b0ddadb80a8357985038cfe26 (diff)
downloadpodman-2850ec5f507ee6c3202f09e099b01a4e550ef0d9.tar.gz
podman-2850ec5f507ee6c3202f09e099b01a4e550ef0d9.tar.bz2
podman-2850ec5f507ee6c3202f09e099b01a4e550ef0d9.zip
Merge pull request #5290 from baude/apiv2imagetests2
add more image tests for go bindings
Diffstat (limited to 'pkg/bindings/connection.go')
-rw-r--r--pkg/bindings/connection.go9
1 files changed, 2 insertions, 7 deletions
diff --git a/pkg/bindings/connection.go b/pkg/bindings/connection.go
index 75f1fc6a5..ba5f9c3aa 100644
--- a/pkg/bindings/connection.go
+++ b/pkg/bindings/connection.go
@@ -206,7 +206,7 @@ func unixClient(_url *url.URL) (*http.Client, error) {
}
// DoRequest assembles the http request and returns the response
-func (c *Connection) DoRequest(httpBody io.Reader, httpMethod, endpoint string, queryParams map[string]string, pathValues ...string) (*APIResponse, error) {
+func (c *Connection) DoRequest(httpBody io.Reader, httpMethod, endpoint string, queryParams url.Values, pathValues ...string) (*APIResponse, error) {
var (
err error
response *http.Response
@@ -225,12 +225,7 @@ func (c *Connection) DoRequest(httpBody io.Reader, httpMethod, endpoint string,
return nil, err
}
if len(queryParams) > 0 {
- // if more desirable we could use url to form the encoded endpoint with params
- r := req.URL.Query()
- for k, v := range queryParams {
- r.Add(k, v)
- }
- req.URL.RawQuery = r.Encode()
+ req.URL.RawQuery = queryParams.Encode()
}
// Give the Do three chances in the case of a comm/service hiccup
for i := 0; i < 3; i++ {