Educational web components for visualizing HTTP request/response data
Show HTTP data in the actual wire format students learn in networking courses.
Automatic highlighting for JSON, HTML, CSS, and JavaScript content types.
List, Duration, and Waterfall views for visualizing multiple requests.
Intercept and display real fetch() and XMLHttpRequest calls in real-time.
Built-in explorer for building and sending HTTP requests interactively.
Pure vanilla JavaScript web components with no external dependencies.
npm install @profpowell/http-component
<script type="module" src="https://unpkg.com/@profpowell/http-component"></script>
<http-transaction id="demo"></http-transaction>
<script type="module">
import '@profpowell/http-component';
document.getElementById('demo').data = {
request: {
method: 'GET',
url: '/api/users',
headers: { 'Accept': 'application/json' }
},
response: {
status: 200,
statusText: 'OK',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ id: 1, name: 'John' })
}
};
</script>
<http-transaction>Display a complete HTTP request/response pair side by side in wire format.
<http-request>Display just the request portion: method, URL, headers, and body.
<http-response>Display just the response portion: status, headers, and body.
<http-waterfall>Visualize multiple HTTP requests with list, duration, and waterfall views.