all repos — honk @ d689276341f5e37c67c6c47b401b7acf36bfa1cc

my fork of honk

masto.go (view raw)

 1package main
 2
 3import (
 4	"net/http"
 5
 6	"humungus.tedunangst.com/r/webs/junk"
 7)
 8
 9func badjunk(rw http.ResponseWriter, j junk.Junk) {
10	elog.Printf("oauthorize: bad junk: %v", j)
11	http.Error(rw, "oauthorize: bad junk", http.StatusBadRequest)
12}
13
14func oauthorize(rw http.ResponseWriter, r *http.Request) {
15	j, err := junk.Read(r.Body)
16	if err != nil {
17		badjunk(rw, j)
18	}
19
20	dlog.Println(j)
21}