~foosoft/anki-connect

67bc56872f07ba2d686b6cbbfca070c373678f77 — David Shepherd 7 years ago b55826a
Clarify that the API accepts JSON
1 files changed, 7 insertions(+), 3 deletions(-)

M README.md
M README.md => README.md +7 -3
@@ 47,8 47,8 @@ extensions) can then communicate with it via HTTP POST requests.

### Sample Invocation ###

Every request consists of an *action*, and a set of contextual *parameters*. A simple example of a JavaScript
application communicating with the extension is illustrated below:
Every request consists of a JSON-encoded object containing an *action*, and a set of contextual *parameters*.
A simple example of a JavaScript application communicating with the extension is illustrated below:

```JavaScript
function ankiInvoke(action, params={}) {


@@ 76,7 76,11 @@ ankiInvoke('version').then(response => {

### Supported Actions ###

The following actions are currently supported:
The following actions are currently supported.

Note that the sample requests are written here as Javascript objects rather than raw JSON.
If you are writing raw requests be sure to send valid JSON (i.e. quote all keys and strings with 
`"`, and remove any comments).

*   **version**


Do not follow this link