package
2.0.0+incompatible
Repository: https://github.com/billmi/go-utils.git
Documentation: pkg.go.dev
# Functions
用于filecoin.
*
Get
@author Bill
*/.
No description provided by the author
No description provided by the author
OnGetJSON 发送get 请求.
OnPostForm form 方式发送post请求.
OnPostJSON 发送修改密码.
*
网络请求POST
*/.
SendGet 发送get 请求 返回对象.
SendGetEx 发送GET请求.
*
Get with TimeOut
Code == 200 则返回,其他请打印错误
第三个参数设置超时 单位:秒 【0:则默认两秒】
*/.
*
@params url 请求地址
@params msg 消息(json字符串)比如 `{"name":"Bill"}`
Ps:也可以使用 BuildData 方法构建数据
@params params 泛型list参数 []interface{}{"123",123}
@params method 调用方法 call
@params header 携带的Http头 map[string]string{}{
"Content-Type" : "application/json",
}
@return 返回字符串
*/.
SendPost 发送POST请求.
*
Post with TimeOut
Code == 200 则返回,其他请打印错误
第三个参数设置超时 单位:秒 【0:则默认两秒】
*/.
No description provided by the author
No description provided by the author
WriteJSON 像指定client 发送json 包msg message.MessageBody.