From 854e5f5e254c05fb85c224b02450440ea414b564 Mon Sep 17 00:00:00 2001 From: Peter Stuifzand Date: Tue, 3 Jul 2018 22:51:31 +0200 Subject: [PATCH] Add logging to micropub endpoint --- cmd/eksterd/micropub.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmd/eksterd/micropub.go b/cmd/eksterd/micropub.go index fc8769e..614e73f 100644 --- a/cmd/eksterd/micropub.go +++ b/cmd/eksterd/micropub.go @@ -4,6 +4,7 @@ import ( "crypto/sha1" "encoding/json" "fmt" + "log" "net/http" "github.com/garyburd/redigo/redis" @@ -21,6 +22,11 @@ func (h *micropubHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { conn := pool.Get() defer conn.Close() + r.ParseForm() + log.Printf("%s %s\n", r.Method, r.URL) + log.Println(r.URL.Query()) + log.Println(r.PostForm) + if r.Method == http.MethodPost { sourceID := r.URL.Query().Get("source_id")