mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-27 13:27:50 +08:00
commands/http: Get string representations of option values when creating querystring
This commit is contained in:
parent
49792b2362
commit
a4e68c241b
@ -66,10 +66,7 @@ func getQuery(req cmds.Request) (string, io.Reader, error) {
|
||||
|
||||
query := url.Values{}
|
||||
for k, v := range req.Options() {
|
||||
str, ok := v.(string)
|
||||
if !ok {
|
||||
return "", nil, u.ErrCast()
|
||||
}
|
||||
str := fmt.Sprintf("%v", v)
|
||||
query.Set(k, str)
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user