quiet output
This commit is contained in:
parent
b7b18626d8
commit
9a87c93bad
4
http.go
4
http.go
|
@ -17,7 +17,7 @@ func (f *Forge) HttpPost(url string, data []byte) ([]byte, error) {
|
||||||
var req *http.Request
|
var req *http.Request
|
||||||
|
|
||||||
req, err = http.NewRequest(http.MethodPost, url, bytes.NewBuffer(data))
|
req, err = http.NewRequest(http.MethodPost, url, bytes.NewBuffer(data))
|
||||||
log.Info("httpPost() with len", len(data), "url", url)
|
// log.Info("httpPost() with len", len(data), "url", url)
|
||||||
|
|
||||||
usr, _ := user.Current()
|
usr, _ := user.Current()
|
||||||
req.Header.Set("author", usr.Username)
|
req.Header.Set("author", usr.Username)
|
||||||
|
@ -35,7 +35,7 @@ func (f *Forge) HttpPost(url string, data []byte) ([]byte, error) {
|
||||||
return []byte("client.Do(req) error"), err
|
return []byte("client.Do(req) error"), err
|
||||||
}
|
}
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
log.Info("httpPost() with len", len(data))
|
// log.Info("httpPost() with len", len(data))
|
||||||
|
|
||||||
body, err := ioutil.ReadAll(resp.Body)
|
body, err := ioutil.ReadAll(resp.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue