Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(relay): request in connection URL #248

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions docs/specs/servers/relay/relay-server-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@

## WebSocket

WebSocket supports JSON-RPC methods. For more details, please visit [Relay RPC docs](./relay-server-rpc.md).
The `/` endpoint is used to establish WebSocket connections. Messages sent are JSON-RPC requests and responses are JSON-RPC responses. See [supported JSON-RPC methods](./relay-server-rpc.md) for valid JSON-RPC payloads.

## HTTP
### Query parameters

### JSON-RPC
- `auth` (required) - A JWT for the client
- `projectId` (required) - The project ID
- `request` - A base64-encoded [JSON-RPC method](./relay-server-rpc.md) to be executed in-parallel with the connection being established. The JSON-RPC response is sent over the WebSocket connection to the client.
- `ua` - A user agent string
- `useOnCloseEvent` - unused?

Used to request JSON-RPC methods. For more details, please visit [Relay RPC docs](./relay-server-rpc.md).
## HTTP RPC

`POST /rpc`
`POST /rpc` can be used to perform JSON-RPC requests. See [supported JSON-RPC methods](./relay-server-rpc.md) on what JSON-RPC methods are supported as POST bodies.