diff options
| author | Jeff Carr <[email protected]> | 2025-09-09 19:15:31 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-09-09 19:15:31 -0500 |
| commit | d656828a0f210561020a7ae742041d19cc44b624 (patch) | |
| tree | 02099a972ef38c6960e353d27450df4fba27f80f /http.go | |
| parent | 1c479b61f6b92829d30340198e2476191cdc168e (diff) | |
Diffstat (limited to 'http.go')
| -rw-r--r-- | http.go | 16 |
1 files changed, 7 insertions, 9 deletions
@@ -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{} |
