snapshot of https://github.com/ThreeDotsLabs/watermill.git (master, 2026-09-15; blobs > 131072B omitted)
Some checks failed
master / ci (push) Failing after 0s

This commit is contained in:
upstream-mirror
2026-09-15 21:27:46 +05:00
commit ce933d1277
538 changed files with 46504 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
package main
import (
"fmt"
"io/ioutil"
"net/http"
"time"
)
// handler receives the webhook requests and logs them in stdout.
func handler(w http.ResponseWriter, r *http.Request) {
body, err := ioutil.ReadAll(r.Body)
if err != nil {
w.WriteHeader(http.StatusBadRequest)
return
}
fmt.Printf(
"[%s] %s %s: %s\n\n",
time.Now().String(),
r.Method,
r.URL.String(),
string(body),
)
w.WriteHeader(http.StatusOK)
}
func main() {
http.HandleFunc("/", handler)
http.ListenAndServe(":8001", http.DefaultServeMux)
}