update inbox list

This commit is contained in:
manhlab
2021-04-07 19:25:18 -04:00
parent fda7245f7c
commit 436de2efd6
8576 changed files with 1013325 additions and 3 deletions

View File

@@ -0,0 +1,15 @@
func makeRequest(method string, url string, cb func(error, io.ReadCloser)) {
req, _ := http.NewRequest(method, url, nil)
resp, err := http.DefaultClient.Do(req)
if err != nil {
cb(err, nil)
} else {
cb(err, resp.Body)
}
}
func main() {
makeRequest("GET", "http://ipinfo.io/json", func(err error, body io.ReadCloser) {
defer body.Close()
io.Copy(os.Stdout, body)
})
}