Skip to content

Commit

Permalink
network: remove nested quotes in parameters
Browse files Browse the repository at this point in the history
Signed-off-by: Rohit Yadav <rohit@apache.org>
  • Loading branch information
rohityadavcloud committed Dec 3, 2018
1 parent 1001560 commit f3e0992
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cmd/network.go
Expand Up @@ -169,7 +169,12 @@ func NewAPIRequest(r *Request, api string, args []string, isAsync bool) (map[str
for _, arg := range args {
parts := strings.SplitN(arg, "=", 2)
if len(parts) == 2 {
params.Add(parts[0], parts[1])
key := parts[0]
value := parts[1]
if strings.HasPrefix(value, "\"") && strings.HasSuffix(value, "\"") {
value = value[1 : len(value)-1]
}
params.Add(key, value)
}
}
params.Add("response", "json")
Expand Down

0 comments on commit f3e0992

Please sign in to comment.