Browse Source

add debug line

Andreas Peters 3 months ago
parent
commit
376991d19f
Signed by: Andreas Peters <ap@aventer.biz> GPG Key ID: 6A83F12541CFCCF9
1 changed files with 3 additions and 0 deletions
  1. 3
    0
      services/nlp/nlp.go

+ 3
- 0
services/nlp/nlp.go View File

@@ -76,6 +76,7 @@ func CmdForwardToNLP(roomID, userID string, message string) interface{} {
76 76
 	log.Println(buf)
77 77
 
78 78
 	resp, err := http.Post("http://avbotnlp.service.dc.aventer.biz:8080/api/v1", "application/json", buf)
79
+	//resp, err := http.Post("http://localhost:8081/api/v1", "application/json", buf)
79 80
 	if err != nil {
80 81
 		return &gomatrix.TextMessage{"m.notice", fmt.Sprintf("nlp: Could not talk with the IKY: %s", err)}
81 82
 	}
@@ -85,6 +86,8 @@ func CmdForwardToNLP(roomID, userID string, message string) interface{} {
85 86
 		return &gomatrix.TextMessage{"m.notice", fmt.Sprintf("nlp: The IKY ignore me: %s", err)}
86 87
 	}
87 88
 
89
+	log.Println(resp.Body)
90
+
88 91
 	body, err := ioutil.ReadAll(resp.Body)
89 92
 
90 93
 	err = json.Unmarshal(body, &decodeResp)

Loading…
Cancel
Save