Home > Backend Development > Golang > Why am I getting a \'Protocol Not Available\' Error When Making an HTTP Request in the Go Playground?

Why am I getting a \'Protocol Not Available\' Error When Making an HTTP Request in the Go Playground?

Mary-Kate Olsen
Release: 2024-11-03 13:46:02
Original
555 people have browsed it

Why am I getting a

http.Get Error Protocol Not Available

Issue:

When executing the example code from http://golang.org/pkg/net/http/#example_Get in the Go Playground, the following error is encountered:

2009/11/10 23:00:00 Get http://www.google.com/robots.txt: dial tcp: Protocol not available
Copy after login

Reason:

The Go Playground does not allow HTTP requests. This security precaution is implemented to prevent malicious code from being executed on the playground. It is unrelated to the code itself.

The above is the detailed content of Why am I getting a \'Protocol Not Available\' Error When Making an HTTP Request in the Go Playground?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template