ContributingWeb client
Requests to the API
The dashboard uses only the public REST API, like the CLI. The browser sends the session cookie with each request.
A query or a mutation of a page calls client.ts.
1 / 3
The dashboard uses only the public REST API, like the CLI. See the API overview.
The rules of a request
| Subject | Rule |
|---|---|
| Format | A query or a mutation is a JSON call to /api/v1/*. |
| Origin | The call goes to the same origin. Thus CORS is not necessary. |
| Proof | The browser sends the session cookie by itself. The app sets no Authorization header. |
| Errors | src/lib/api/client.ts wraps fetch. It changes an error body into ApiError { status, code, message }. |
Sign-in and the session describes the cookie. Live updates describes the streams.