您可以设置一个不透明的网址。
假设您想要url指向
http://example.com/test(a)您想要做的事情:
req.NewRequest("GET", "http://example.com/test(a)", nil)req.URL = &url.URL{ Scheme: "http", Host: "example.com", Opaque: "//example.com/test(a)",}client.Do(req)示例:http://play.golang.org/p/09V67Hbo6H
文档:http :
//golang.org/pkg/net/url/#URL



