Skip to content

Commit 178f22c

Browse files
committed
allow store to use http query params in requests
1 parent 70d63ae commit 178f22c

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

remotehttp.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,14 @@ retry:
173173

174174
// GetObject reads and returns an object in the form of []byte from the store
175175
func (r *RemoteHTTPBase) GetObject(name string) ([]byte, error) {
176-
u, _ := r.location.Parse(name)
176+
var u *url.URL
177+
query := r.location.Query().Encode()
178+
if query == "" {
179+
u, _ = r.location.Parse(name)
180+
} else {
181+
u, _ = r.location.Parse(name + "?" + query)
182+
}
183+
177184
statusCode, responseBody, err := r.IssueRetryableHttpRequest("GET", u, func() io.Reader { return nil })
178185
if err != nil {
179186
return nil, err

0 commit comments

Comments
 (0)