Browse Source

Leave off extra leading slash in bulk requests

tags/v1.2.2
Paul Bonser 7 years ago
parent
commit
2715203d96
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      request.go

+ 4
- 1
request.go View File

@@ -47,7 +47,10 @@ type Request struct {

// URL builds a URL for a Request
func (req *Request) URL() *url.URL {
path := "/" + strings.Join(req.IndexList, ",")
var path string
if len(req.IndexList) > 0 {
path = "/" + strings.Join(req.IndexList, ",")
}

if len(req.TypeList) > 0 {
path += "/" + strings.Join(req.TypeList, ",")


Loading…
Cancel
Save