anki-connect/plugin
oakkitten bffbb051f2 Produce a better error in case of malformed JSON
$ curl localhost:8777 -X POST -i -d '{"action": "version", "version": 6},' && echo ␄
HTTP/1.1 200 OK
Content-Type: text/json
Access-Control-Allow-Origin: http://localhost
Access-Control-Allow-Headers: *
Content-Length: 67

{"result": null, "error": "Extra data: line 1 column 36 (char 35)"}␄

$ curl localhost:8777 -X POST -i -d '{"action": "version", "version": 6},' -H "Origin: foo" && echo ␄
HTTP/1.1 403 Forbidden
Access-Control-Allow-Origin: http://localhost
Access-Control-Allow-Headers: *

␄
2022-05-11 20:32:08 +01:00
..
__init__.py Produce a better error in case of malformed JSON 2022-05-11 20:32:08 +01:00
config.json Add requestPermission API method (#255) 2021-05-07 20:33:06 -07:00
config.md Cleanup 2020-01-05 16:24:20 -08:00
edit.py Explicitly require Anki >= 2.1.45 2022-04-26 15:22:06 +01:00
util.py Patch Anki 2.1.50 on Windows to have valid stdout 2022-04-26 15:22:07 +01:00
web.py Produce a better error in case of malformed JSON 2022-05-11 20:32:08 +01:00