码农笔录博客源码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

24 lines
503 B

package utils
import (
"io/ioutil"
"net/http"
"strconv"
"strings"
)
const baseUrl = "https://www.aiprose.com/blog/"
func PostDataZZ(id int64) {
dataStr := baseUrl + strconv.FormatInt(id, 10)
url := "http://data.zz.baidu.com/urls?site=www.aiprose.com&token=lO2wHMVqVq8SC9Ag"
res, err := http.Post(url, "text/plain", strings.NewReader(dataStr))
if err != nil {
println(err)
}
defer res.Body.Close()
content, err := ioutil.ReadAll(res.Body)
if err != nil {
println(string(content))
}
}