Ready-to-use App examples for common API workflows.
The examples below are self-contained. Paste any of them into the App tab’s code editor, save, and activate App Mode to try them out.
bru.ctx data arrives asynchronously after page load. Always do the first render inside bru.ctx.onInit, then react to later changes via on*Change callbacks. Reading state at the top level or on DOMContentLoaded returns null or empty values.
Renders the latest response instantly whenever one arrives — from the Send button, the runner, or another App call. No polling or manual refresh needed.
<pre id="out">Waiting for a response…</pre><script> function render(response) { document.getElementById('out').textContent = response ? JSON.stringify(response.data, null, 2) : 'Waiting for a response…'; } bru.ctx.onInit = () => render(bru.ctx.http.response); bru.ctx.http.onResponseChange = render;</script>
JSX is transpiled in-browser via @babel/standalone. Pin to @7 (the newer automatic JSX runtime emits import statements that inline text/babel scripts cannot handle).