This commit is contained in:
ston1th 2020-06-01 15:17:50 +02:00
commit 6de6e8001f
2 changed files with 5 additions and 1 deletions

View file

@ -5,6 +5,7 @@ package pve
import (
"encoding/json"
"errors"
"fmt"
"io"
"net/http"
"net/url"
@ -41,5 +42,7 @@ func (b httpbody) Reader() io.Reader {
for k, v := range b {
data.Set(k, v)
}
return strings.NewReader(data.Encode())
enc := data.Encode()
fmt.Println("--- encoded:", enc)
return strings.NewReader(enc)
}

View file

@ -32,6 +32,7 @@ func (s *Server) body() (httpbody, error) {
"searchdomain": s.SearchDomain,
}
userdata, err := s.UserData.String()
fmt.Println("--- plain:", userdata)
body["ciuserdata"] = userdata
for i, n := range s.NetDevices {
body["net"+strconv.Itoa(i)] = n.String()