mirror of
https://github.com/retailcrm/graphql-php.git
synced 2024-11-25 06:16:05 +03:00
Add content type header to curl. This fixes #264.
This commit is contained in:
parent
7762430bc3
commit
f2678b4a10
@ -10,10 +10,10 @@ php -S localhost:8080 ./graphql.php
|
||||
|
||||
### 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
|
||||
```
|
||||
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) }" }'
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user