英文:
Go urlfetch.Transport.RoundTrip, can call in GET, but not POST?
问题
我在GAE Go中无法从urlfetch.Transport.RoundTrip获得任何响应。当我在浏览器中浏览调用该函数的页面时,调用会按预期执行。当从poclbm比特币矿工发出的POST请求中调用相同的函数时,我无法获得响应。
调用是由我创建的这个包的第77行发出的。
在Google App Engine中,是否可以通过HTTP GET请求从其他网页请求数据,但不能通过POST请求?还是还有其他原因导致这个问题?
英文:
I'm having a problem getting any response from urlfetch.Transport.RoundTrip in GAE Go. When I browse a page that makes the call in a browser, the call is executed as intended. When the same function is called from a POST request made by poclbm Bitcoin miner, I can't get a response.
The call is made by this package I made at line 77.
Is it possible, that in Google App Engine one can request data from other web pages under a HTTP GET, but not POST, or is there something else that can be causing this problem?
答案1
得分: 3
你可以使用http.Client.Post在App Engine上进行POST请求,只需确保使用urlfetch.Client函数创建http客户端。
英文:
You can do POST request from App Engine using http.Client.Post, just make sure you create the http client with urlfetch.Client function.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论