我在Apache下运行脚本。我了解如何创建请求,例如:
http.Get(url)
我如何获得GET请求?我真的没有在文档中看到此信息。提前致谢!
UPD例如,我从另一个脚本对我的go脚本执行GET或POST请求。在PHP中,我只写$ a = $ _ GET [“ param”]。我如何在Go中做到这一点?不好意思,英语不好
您的处理程序传递了一个Request。例如,在该请求中,您Form
使用ParseForm对其进行解析后便会在字段中找到参数:
// Form contains the parsed form data, including both the URL
// field's query parameters and the POST or PUT form data.
// This field is only available after ParseForm is called.
// The HTTP client ignores Form and uses Body instead.
Form url.Values
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句