基于golang发送Post和Get请求
1. http的服务端可以参照之前写的文章
https://blog.csdn.net/HelloWorldYangSong/article/details/104265124
2. 发送POST和Get请求
package http
import (
bytes
encoding/json
io
io/ioutil
net/http
time
)
// 发送GET请求
// url: 请求地址
// response: 请求返回的内容
func Get(url string) string {
// 超时时间:5秒
client