Skip to content

Commit 53bdf20

Browse files
authored
http handler sends application/json as response (#71)
1 parent a2829a0 commit 53bdf20

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

go.sum

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ github.com/nautilus/graphql v0.0.4 h1:+UU6LqfOcHwOM8juIIaEbIZooio37Mlh8anx33DQ3X
5151
github.com/nautilus/graphql v0.0.4/go.mod h1:58l1aeXqmU+gAfwagVHqTUv8C6LBfa63mZ6VHj1dbXQ=
5252
github.com/nautilus/graphql v0.0.5 h1:BtqfavjBdBjltfLfNooaDsCH4t+SoMlcGdHY10grWh0=
5353
github.com/nautilus/graphql v0.0.5/go.mod h1:58l1aeXqmU+gAfwagVHqTUv8C6LBfa63mZ6VHj1dbXQ=
54+
github.com/nautilus/graphql v0.0.6 h1:/OgDKNLmigZ9JqfBiv8UHMxaWntbSzNDBuI+DWa7dlQ=
5455
github.com/nautilus/graphql v0.0.6/go.mod h1:58l1aeXqmU+gAfwagVHqTUv8C6LBfa63mZ6VHj1dbXQ=
5556
github.com/opentracing/opentracing-go v1.0.2 h1:3jA2P6O1F9UOrWVpwrIo17pu01KWvNWg4X946/Y5Zwg=
5657
github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=

http.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ func (g *Gateway) GraphQLHandler(w http.ResponseWriter, r *http.Request) {
180180
}
181181

182182
// send the result to the user
183+
w.Header().Set("Content-Type", "application/json")
183184
w.WriteHeader(statusCode)
184185
fmt.Fprint(w, string(response))
185186
}

0 commit comments

Comments
 (0)