mirror of
https://github.com/silenceper/wechat.git
synced 2026-02-04 12:52:27 +08:00
实现access_token获取
This commit is contained in:
19
util/http.go
Normal file
19
util/http.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package util
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
//HTTPGet get 请求
|
||||
func HTTPGet(url string) ([]byte, error) {
|
||||
response, err := http.Get(url)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return ioutil.ReadAll(response.Body)
|
||||
}
|
||||
|
||||
//HTTPPost post 请求
|
||||
func HTTPPost() {
|
||||
}
|
||||
Reference in New Issue
Block a user