Use common EncodeURLValues function where possible

This commit is contained in:
Adrian Gallagher
2015-11-01 18:34:44 +11:00
parent b2e39f17f5
commit e5b27492bd
6 changed files with 14 additions and 88 deletions

View File

@@ -274,11 +274,7 @@ func (b *BTCC) GetTradeHistory(symbol string, limit, sinceTid int64, time time.T
v.Set("sincetype", strconv.FormatInt(time.Unix(), 10))
}
values := v.Encode()
if len(values) > 0 {
req += "?" + values
}
req = EncodeURLValues(req, v)
err := SendHTTPGetRequest(req, true, nil)
if err != nil {
log.Println(err)