summaryrefslogtreecommitdiff
path: root/http.go
diff options
context:
space:
mode:
Diffstat (limited to 'http.go')
-rw-r--r--http.go16
1 files changed, 7 insertions, 9 deletions
diff --git a/http.go b/http.go
index fae1ff7..f2a470c 100644
--- a/http.go
+++ b/http.go
@@ -37,10 +37,10 @@ func (m *Machine) HttpPostMachine(url string) ([]byte, error) {
log.Info("WTF. check == nil")
}
// log.Info("good? check.hostname =", m.Hostname)
- return m.HttpPost(url, msg)
+ return m.HttpPostOld(url, msg)
}
-func (m *Machine) HttpPost(url string, data []byte) ([]byte, error) {
+func (m *Machine) HttpPostOld(url string, data []byte) ([]byte, error) {
var err error
var req *http.Request
@@ -49,13 +49,11 @@ func (m *Machine) HttpPost(url string, data []byte) ([]byte, error) {
usr, _ := user.Current()
req.Header.Set("author", usr.Username)
- /*
- if f.Machine == nil {
- // run f.InitMachine() here?
- log.Info("you must run f.InitMachine()")
- return nil, fmt.Errorf("you must run f.InitMachine()")
- }
- */
+ // if f.Machine == nil {
+ // // run f.InitMachine() here?
+ // log.Info("you must run f.InitMachine()")
+ // return nil, fmt.Errorf("you must run f.InitMachine()")
+ // }
req.Header.Set("hostname", m.Hostname)
client := &http.Client{}