mirror of
https://github.com/ipfs/kubo.git
synced 2025-07-01 10:49:24 +08:00
commands/http: Send request arguments in client requests
This commit is contained in:

committed by
Juan Batiz-Benet

parent
753162529a
commit
42633e5d40
@ -34,10 +34,12 @@ func Send(req cmds.Request) (cmds.Response, error) {
|
||||
req.SetOption(cmds.EncShort, encoding)
|
||||
|
||||
query := "?"
|
||||
options := req.Options()
|
||||
for k, v := range options {
|
||||
for k, v := range req.Options() {
|
||||
query += "&" + k + "=" + v.(string)
|
||||
}
|
||||
for _, v := range req.Arguments() {
|
||||
query += "&arg=" + v
|
||||
}
|
||||
|
||||
httpRes, err := http.Post(url+query, "application/octet-stream", req.Stream())
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user