Add content type header to curl. This fixes #264.

This commit is contained in:
sarukuku 2018-04-04 16:26:57 +03:00
parent 7762430bc3
commit f2678b4a10

View File

@ -10,10 +10,10 @@ php -S localhost:8080 ./graphql.php
### Try query ### Try query
``` ```
curl http://localhost:8080 -d '{"query": "query { echo(message: \"Hello World\") }" }' curl -H "Content-Type: application/json" -d '{"query": "query { echo(message: \"Hello World\") }" }' http://localhost:8080
``` ```
### Try mutation ### Try mutation
``` ```
curl http://localhost:8080 -d '{"query": "mutation { sum(x: 2, y: 2) }" }' curl -H "Content-Type: application/json" http://localhost:8080 -d '{"query": "mutation { sum(x: 2, y: 2) }" }'
``` ```