I have a simple function in GAE golang:
func Call(c appengine.Context, guid string, function string, parameters map[string]string) string {
client:=urlfetch.Client(c)
values := url.Values{}
c.Infof("%v", parameters)
for k, v := range parameters {
values.Set(k, v)
}
c.Infof("%v", values)
resp, err:=client.PostForm("https://blockchain.info/merchant/"+guid+"/"+function, values)
var answer string
if err != nil {
c.Errorf("BlockchainAPI post error: %s", err)
}
c.Infof("%v", resp.Request.PostForm)
[...]
I get these printouts:
2013/10/14 23:17:51 INFO: map[main_password:password]
2013/10/14 23:17:51 INFO: map[main_password:[password]]
2013/10/14 23:17:52 INFO: https://blockchain.info/merchant/guid/function
2013/10/14 23:17:52 INFO: map[]
It looks as if client.PostForm
does not pass values
to the request and not get them back in response. What can be causing this error?