diff --git a/docs/iam/access-manager-plugin.go b/docs/iam/access-manager-plugin.go index fe818af75..218083a3e 100644 --- a/docs/iam/access-manager-plugin.go +++ b/docs/iam/access-manager-plugin.go @@ -21,6 +21,7 @@ package main import ( + "bytes" "encoding/json" "flag" "fmt" @@ -58,6 +59,10 @@ func mainHandler(w http.ResponseWriter, r *http.Request) { return } + var out bytes.Buffer + json.Indent(&out, body, "", " ") + fmt.Printf("Received JSON payload:\n%s\n", out.String()) + reqMap := make(map[string]interface{}) err = json.Unmarshal(body, &reqMap) if err != nil { @@ -65,8 +70,6 @@ func mainHandler(w http.ResponseWriter, r *http.Request) { return } - // fmt.Printf("request: %#v\n", reqMap) - m := reqMap["input"].(map[string]interface{}) accountValue := m["account"].(string) actionValue := m["action"].(string)