Extends the Automerge-swift library, providing support for working with multiple Automerge documents at once, with pluggable network and storage providers.
In addition to URL, you can use a URLRequest to WebSocketProvider to connect to. This is needed for connecting to sync servers that require custom headers, for example.
var request = URLRequest(url: URL(string: "wss://example.com")!)
request.addValue("token", forHTTPHeaderField: "Authorization") // for example
let websocket = WebSocketProvider(.default)
websocket.connect(to: request)
In addition to
URL
, you can use aURLRequest
toWebSocketProvider
to connect to. This is needed for connecting to sync servers that require custom headers, for example.