docs: update curl HTTP POST example
Must set 'Content-Type: application/json' header due to #1668
This commit is contained in:
parent
4a75a39880
commit
4f8b755a2a
@ -25,7 +25,7 @@ to listen to events, you should probably use the WebSocket API instead.
|
|||||||
|
|
||||||
Example usage from the command line::
|
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"}
|
{"jsonrpc": "2.0", "id": 1, "result": "stopped"}
|
||||||
|
|
||||||
For details on the request and response format, see :ref:`json-rpc`.
|
For details on the request and response format, see :ref:`json-rpc`.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user