本文介绍了http.Get返回协议不可用错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我尝试在,它会返回以下错误:
任何想法为什么?
解决方案
Go Playground不允许HTTP请求。这与代码无关。这是游乐场执行的安全措施。
When I try to run this example at http://golang.org/pkg/net/http/#example_Get, it returns the following error
Any idea why?
解决方案
The Go Playground does not allow HTTP requests. This has nothing to do with code. It is a security precaution enforced by the playground.
这篇关于http.Get返回协议不可用错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!