Client for router API

Note: this also includes a couple of changes to `JsonClient`:

* 8f97721 - Change handling of HTTP error with JSON body.
* aa5848a - Make `delete_json` call `do_json_request` as the previous behaviour was non-obvious.