HTTP JSON Console

A client-side web application that polls HTTP endpoints and displays JSON responses in a console-like interface using XMLHttpRequest.

Features

  • HTTP Polling: Continuously fetch JSON data from any HTTP endpoint (defaults to http://127.0.0.1:8080)
  • Configurable Interval: Adjust polling frequency from 100ms to 10 seconds
  • JSON Response Display: Automatically formats and displays HTTP responses
  • Console Interface: Terminal-style dark theme with timestamped, color-coded messages
  • Request Management: Start/stop polling controls with real-time status indicators
  • Statistics Tracking: Counts total requests and errors
  • Error Handling: Comprehensive HTTP error handling with status codes
  • Clear Console: Reset the message display at any time

Usage

  1. Open the web application
  2. Enter your HTTP endpoint URL (default: http://127.0.0.1:8080)
  3. Set the polling interval in milliseconds (default: 1000ms)
  4. Click "Start" to begin polling the endpoint
  5. JSON responses will be displayed in real-time in the console
  6. Use "Clear" to reset the console or "Stop" to halt polling

Project Structure

├── backend/
│   └── index.ts          # Hono server that serves the HTML
├── frontend/
│   └── index.html        # Main web application with XMLHttpRequest client
└── README.md

Technical Details

  • Frontend: Pure HTML/CSS/JavaScript with TailwindCSS for styling
  • Backend: Hono server for serving static files
  • HTTP Client: Native browser XMLHttpRequest API
  • Polling: Configurable interval-based requests
  • Error Handling: HTTP status codes, network errors, and timeouts
  • Timeout: 5-second request timeout to prevent hanging
  • Responsive Design: Works on desktop and mobile devices

The application runs entirely client-side once loaded, making HTTP requests directly from the browser to your specified endpoint.