This commit is contained in:
Andrey Parhomenko 2024-01-10 23:42:39 +03:00
parent 205f82dc25
commit 8ea98e8586

View file

@ -7,6 +7,7 @@ import (
"fmt"
"io"
"net/url"
"encoding/json"
)
type GetNotesOptions struct {
@ -33,12 +34,18 @@ Def(
return
}
fmt.Printf("unescapeBody: %q\n", unesc)
values, err := url.ParseQuery(string(body))
mp := map[string] any{}
err = bond.ParseStr(unesc, mp)
if err != nil {
fmt.Printf("err:%s\n", err)
return
}
fmt.Printf("Values: %q\n", values)
js, err := json.MarshalIndent(mp, "", "\t")
if err != nil {
fmt.Printf("err:%s\n", err)
return
}
fmt.Printf("\nparsed: %v\n", string(js))
c.SetStatus(statuses.OK)
}),
//),