parent
3a50ec0463
commit
7c0cc2fdbc
@ -0,0 +1,9 @@
|
||||
package pinduoduo
|
||||
|
||||
const (
|
||||
apiUrl = "https://whois.pconline.com.cn"
|
||||
)
|
||||
|
||||
const (
|
||||
logTable = "pinduoduo"
|
||||
)
|
@ -0,0 +1,31 @@
|
||||
package pinduoduo
|
||||
|
||||
import (
|
||||
"go.dtapp.net/library/utils/gorequest"
|
||||
"go.dtapp.net/library/utils/gostring"
|
||||
)
|
||||
|
||||
func (c *Client) request(params map[string]interface{}) (gorequest.Response, error) {
|
||||
|
||||
// 签名
|
||||
c.Sign(params)
|
||||
|
||||
// 创建请求
|
||||
client := c.client
|
||||
|
||||
// 设置参数
|
||||
client.SetParams(params)
|
||||
|
||||
// 发起请求
|
||||
request, err := client.Get()
|
||||
if err != nil {
|
||||
return gorequest.Response{}, err
|
||||
}
|
||||
|
||||
// 日志
|
||||
if c.logStatus == true {
|
||||
go c.postgresqlLog(gostring.ToString(params["type"]), request)
|
||||
}
|
||||
|
||||
return request, err
|
||||
}
|
Loading…
Reference in new issue