some small changes

This commit is contained in:
2018-10-16 22:03:50 +01:00
parent 46fced4196
commit d7df7b58b4
10 changed files with 713 additions and 9 deletions
+5 -1
View File
@@ -21,7 +21,7 @@ func execute(request *Request) ([]byte, error) {
xmlBody := []byte("<?xml version=\"1.0\" encoding=\"utf-8\"?>")
xmlBody = append(xmlBody, request.Command.GetRequestBody()...)
body := bytes.NewReader(xmlBody)
// panic(string(xmlBody))
req, _ := http.NewRequest(
"POST",
fmt.Sprintf("%s/ws/api.dll", config.BaseUrl),
@@ -50,6 +50,10 @@ func execute(request *Request) ([]byte, error) {
return []byte{}, fmt.Errorf("<%d> - %s", resp.StatusCode, rspBody)
}
reqBody, _ := ioutil.ReadAll(resp.Request.Body)
log.Println(string(reqBody))
rspBody, _ := ioutil.ReadAll(resp.Body)
return rspBody, nil