mpizenberg/elm-xhr-bytes-bridge/1.0.0

XhrBytesBridge

XHR monkeypatch bridge for transferring Bytes between Elm and JS without JSON encoding. Consumers use routeUrl to build URLs for Http.request calls that are intercepted by the companion JS module.

prefix : String

The URL prefix used by the XHR monkeypatch to intercept requests.

routeUrl : String -> String -> String

Build a route URL for the XHR bridge.

routeUrl "ws-send" "ws://example.com/chat"
--> "https://xbb.localhost/.xhrhook/ws-send/ws%3A%2F%2Fexample.com%2Fchat"