golang http请求数据怎么传body体参数

ChayTang · · 11697 次点击
建议您好好看这个 https://imququ.com/post/four-ways-to-post-data-in-http.html 了解HTTP POST 的请求的分别。
#4
更多评论
godoc 文档,的参是 resp, err := http.PostForm("http://example.com/form", url.Values{"key": {"Value"}, "id": {"123"}}) postform 应该是content-type www-formurlencoded , 所以请求参数应该是在URL 里, 而不是body ?如果有错,纠正。谢谢。
#1
那请问怎么放在body体里?有别的方法吗?
#2