Compare commits
2 Commits
e79b883faa
...
55ef797f68
Author | SHA1 | Date | |
---|---|---|---|
55ef797f68 | |||
67fd816e3f |
|
@ -510,6 +510,7 @@ func Fetch2(fetchURL string) (*http.Response, error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("error while fetching %s: %s", u, err)
|
return nil, fmt.Errorf("error while fetching %s: %s", u, err)
|
||||||
}
|
}
|
||||||
|
defer resp.Body.Close()
|
||||||
|
|
||||||
var b bytes.Buffer
|
var b bytes.Buffer
|
||||||
resp.Write(&b)
|
resp.Write(&b)
|
||||||
|
|
|
@ -72,6 +72,7 @@ func (h *microsubHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||||
jw := json.NewEncoder(w)
|
jw := json.NewEncoder(w)
|
||||||
w.Header().Add("Content-Type", "application/json")
|
w.Header().Add("Content-Type", "application/json")
|
||||||
jw.SetIndent("", " ")
|
jw.SetIndent("", " ")
|
||||||
|
jw.SetEscapeHTML(false)
|
||||||
err = jw.Encode(timeline)
|
err = jw.Encode(timeline)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
http.Error(w, err.Error(), 500)
|
http.Error(w, err.Error(), 500)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user