The testable half of :method :sse: URL building and the a-data state transitions.
It exists as its own namespace because bangmod.http-api.internal requires ajax.core,
which touches js/XMLHttpRequest at load time and so may not load under :node-test.
Keeping the pure code out of there is what lets the reconnect POLICY be unit-tested even
though the transport itself can only be verified in a browser.
The testable half of `:method :sse`: URL building and the `a-data` state transitions. It exists as its own namespace because `bangmod.http-api.internal` requires `ajax.core`, which touches `js/XMLHttpRequest` at load time and so may not load under `:node-test`. Keeping the pure code out of there is what lets the reconnect POLICY be unit-tested even though the transport itself can only be verified in a browser.
(backoff-ms attempt)Reconnect delay for attempt (0-based), capped at 30 s. Used only for a CLOSED
EventSource — a CONNECTING one is already retrying on the server's retry: field.
Reconnect delay for `attempt` (0-based), capped at 30 s. Used only for a `CLOSED` EventSource — a `CONNECTING` one is already retrying on the server's `retry:` field.
(replace-path-params uri path-params):param placeholders in uri filled from path-params — the same rule
bangmod.http-api.internal applies to a request URI.
`:param` placeholders in `uri` filled from `path-params` — the same rule `bangmod.http-api.internal` applies to a request URI.
(stream-url base-url uri path-params params token)The full URL an EventSource is opened against.
EventSource cannot set request headers, so the bearer token travels as
?access_token= (RFC 6750 §2.3) — the one route in this API that accepts it.
The full URL an `EventSource` is opened against. `EventSource` cannot set request headers, so the bearer token travels as `?access_token=` (RFC 6750 §2.3) — the one route in this API that accepts it.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |