@cryptotaxi247 / kubo / commits / 42633e5d4

commands/http: Send request arguments in client requests

Matt Bell committed Oct 28, 2014 at 17:28 UTC 42633e5d40e5f63713819e0f397a26d0a9d3c4b9
1 file changed +4 -2
commands/http/client.go
+4 -2
@@ -34,10 +34,12 @@ func Send(req cmds.Request) (cmds.Response, error) {
34 req.SetOption(cmds.EncShort, encoding)
35
36 query := "?"
37 - options := req.Options()
38 - for k, v := range options {
37 + for k, v := range req.Options() {
38 query += "&" + k + "=" + v.(string)
39 }
40 + for _, v := range req.Arguments() {
41 + query += "&arg=" + v
42 + }
43
44 httpRes, err := http.Post(url+query, "application/octet-stream", req.Stream())
45 if err != nil {