u
Anirudh Oppiliappan x@icyphox.sh
Tue, 26 Sep 2023 20:03:07 +0300
1 files changed,
3 insertions(+),
3 deletions(-)
jump to
M
masto.go
→
masto.go
@@ -1,6 +1,7 @@
package main import ( + "bytes" "crypto/rand" "fmt" "net/http"@@ -11,7 +12,7 @@ "humungus.tedunangst.com/r/webs/login"
) type NotResponseWriter struct { - body []byte + body bytes.Buffer header http.Header }@@ -20,8 +21,7 @@ return w.header
} func (w NotResponseWriter) Write(b []byte) (int, error) { - w.body = b - return 0, nil + return w.body.Write(b) } func (w NotResponseWriter) WriteHeader(statusCode int) {}