Merge pull request #265 from sarukuku/master

Add content type header to curl commands on server example
This commit is contained in:
Vladimir Razuvaev 2018-04-05 14:47:40 +08:00 committed by GitHub
commit 87729589e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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 -d '{"query": "query { echo(message: \"Hello World\") }" }' -H "Content-Type: application/json" http://localhost:8080
``` ```
### Try mutation ### Try mutation
``` ```
curl http://localhost:8080 -d '{"query": "mutation { sum(x: 2, y: 2) }" }' curl -d '{"query": "mutation { sum(x: 2, y: 2) }" }' -H "Content-Type: application/json" http://localhost:8080
``` ```