Эх сурвалжийг харах

Merge pull request #1483 from methane/go-fix-content-type

go: Fix Content-Type
Brittany Mazza 10 жил өмнө
parent
commit
941f40ca66

+ 1 - 1
frameworks/Go/go/src/hello/hello.go

@@ -84,7 +84,7 @@ func main() {
 
 // Test 1: JSON serialization
 func jsonHandler(w http.ResponseWriter, r *http.Request) {
-	w.Header().Set("Content-Type", "application/javascript")
+	w.Header().Set("Content-Type", "application/json")
 	json.NewEncoder(w).Encode(&Message{helloWorldString})
 }