docs: update curl HTTP POST example

Must set 'Content-Type: application/json' header due to #1668
This commit is contained in:
Nick Steel 2018-10-08 17:24:59 +01:00 committed by GitHub
parent 4a75a39880
commit 4f8b755a2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,7 +25,7 @@ to listen to events, you should probably use the WebSocket API instead.
Example usage from the command line::
$ curl -d '{"jsonrpc": "2.0", "id": 1, "method": "core.playback.get_state"}' http://localhost:6680/mopidy/rpc
$ curl -d '{"jsonrpc": "2.0", "id": 1, "method": "core.playback.get_state"}' http://localhost:6680/mopidy/rpc -H 'Content-Type: application/json'
{"jsonrpc": "2.0", "id": 1, "result": "stopped"}
For details on the request and response format, see :ref:`json-rpc`.