GUI can now send to say as concat string

This commit is contained in:
Bel LaPointe
2023-03-27 17:53:56 -06:00
parent 7e4b7b2080
commit 75149668ef
3 changed files with 25 additions and 10 deletions

View File

@@ -11,7 +11,7 @@ func main() {
p := os.Getenv("PORT")
if err := http.ListenAndServe(":"+p, http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
b, _ := io.ReadAll(r.Body)
log.Printf("> %s", b)
log.Printf("> %s (%+v) %s", r.URL, r.Header, b)
body := os.Getenv("BODY")
if body == "-" {
body = string(b)