# `ZenWebsocket.Examples.Docs.BasicUsage`
[🔗](https://github.com/ZenHive/zen_websocket/blob/v0.8.0/lib/zen_websocket/examples/docs/basic_usage.ex#L1)

Minimal connect-send-receive flows against a live endpoint.

Exercises `Client.connect/2` (with a URL and with a `ZenWebsocket.Config` carrying
custom headers), `Client.send_message/2` for a correlated JSON-RPC request, and
`Client.close/1`.

# `custom_headers_example`

```elixir
@spec custom_headers_example(String.t()) :: {:ok, ZenWebsocket.Client.t()}
```

Connection with custom headers example.

Shows how to connect with authorization headers and other custom headers.

# `deribit_testnet_example`

```elixir
@spec deribit_testnet_example() :: {:ok, ZenWebsocket.Client.t()}
```

Simple Deribit testnet connection example.

Connects to Deribit testnet, sends a public API request, and receives response.
The default handler automatically sends messages to the calling process.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
