Set "Content-Type: application/json"
This commit is contained in:
parent
ee147fea3c
commit
96f1e3bef9
1
main.go
1
main.go
|
@ -57,6 +57,7 @@ func main() {
|
||||||
})
|
})
|
||||||
|
|
||||||
http.HandleFunc("GET /api/sidewalks", func(w http.ResponseWriter, r *http.Request) {
|
http.HandleFunc("GET /api/sidewalks", func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
w.Header().Set("Content-Type", "application/json")
|
||||||
json.NewEncoder(w).Encode(sidewalks)
|
json.NewEncoder(w).Encode(sidewalks)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue