A lightweight, standalone HTTP service for testing and development with WebSocket and Server-Sent Events (SSE) support. Perfect for mocking APIs, simulating network conditions, and testing real-time communication.
# Run with Docker
docker run -p 8080:8080 bbdrummer/dummy-responder:latest
# Test basic functionality
curl http://localhost:8080/health
# Test with custom parameters
curl "http://localhost:8080/?responseCode=200&message=Hello&responseTime=1s"
# Simple response
curl http://localhost:8080/
# Random status codes with 30% failure rate
curl "http://localhost:8080/?responseCode=random&failureRate=0.3"
# Simulate slow API (2 second delay)
curl "http://localhost:8080/?responseTime=2s&message=Slow%20API"
# Different content types
curl "http://localhost:8080/?contentType=text/plain&message=Plain%20text"
# WebSocket (requires wscat: npm install -g wscat)
wscat -c "ws://localhost:8080/ws?message=Hello&wsInterval=2s"
# Server-Sent Events
curl -N "http://localhost:8080/sse?message=Live%20Events&sseInterval=1s"
# Interactive test page
open http://localhost:8080/test
| Parameter | Description | Examples | Applies To |
|---|---|---|---|
responseCode | HTTP status code | 200, 404, 500, random | HTTP |
responseTime | Response delay | 100ms, 2s, random | HTTP |
failureRate | Error probability (0-1) | 0.1 (10%), 0.5 (50%) | HTTP |
message | Custom message | Hello World, API Down | All |
contentType | Response format | application/json, text/plain | HTTP |
wsInterval | WebSocket message interval | 1s, 500ms, 5s | WebSocket |
sseInterval | SSE event interval | 1s, 2s, 10s | SSE |
| Endpoint | Protocol | Description |
|---|---|---|
/ | HTTP | Configurable HTTP responses |
/health | HTTP | Health check endpoint |
/ws | WebSocket | Real-time message streaming |
/sse, /events | HTTP | Server-Sent Events streaming |
/test | HTTP | Interactive test page |
/swagger/ | HTTP | OpenAPI documentation |
# Basic run
docker run -p 8080:8080 bbdrummer/dummy-responder
# With custom port
docker run -p 3000:8080 bbdrummer/dummy-responder
# Background with restart policy
docker run -d --restart unless-stopped -p 8080:8080 bbdrummer/dummy-responder
version: '3.8'
services:
dummy-responder:
image: bbdrummer/dummy-responder:latest
ports:
- "8080:8080"
restart: unless-stopped
apiVersion: apps/v1
kind: Deployment
metadata:
name: dummy-responder
spec:
replicas: 1
selector:
matchLabels:
app: dummy-responder
template:
metadata:
labels:
app: dummy-responder
spec:
containers:
- name: dummy-responder
image: bbdrummer/dummy-responder:latest
ports:
- containerPort: 8080
resources:
requests:
memory: "32Mi"
cpu: "50m"
limits:
memory: "128Mi"
cpu: "200m"
---
apiVersion: v1
kind: Service
metadata:
name: dummy-responder
spec:
selector:
app: dummy-responder
ports:
- port: 80
targetPort: 8080
{
"message": "Hello World",
"requestInfo": {
"method": "GET",
"path": "/",
"query": "responseCode=200&message=Hello"
},
"timestamp": "2025-08-30T09:17:30Z",
"config": {
"responseCode": 200,
"failureRate": 0.1,
"responseTime": "1s",
"message": "Hello World"
}
}
{
"message": "Hello WebSocket",
"counter": 1,
"timestamp": "2025-08-30T09:17:30Z",
"service": "dummy-responder",
"type": "websocket"
}
id: 1
event: message
data: {"message":"Hello SSE","counter":1,"timestamp":"2025-08-30T09:17:30Z","service":"dummy-responder","type":"sse"}
curl http://localhost:8080/health
{
"status": "healthy",
"service": "dummy-responder",
"timestamp": "2025-08-30T09:17:30Z"
}
Visit http://localhost:8080/test in your browser for an interactive test page where you can:
Visit http://localhost:8080/swagger/ for complete OpenAPI documentation with:
Perfect for developers who need a reliable, configurable service for testing and development! ๐ฏ
Visit http://responder.bjoernbartels.tech/โ for complete developers' documentation.
Content type
Image
Digest
sha256:1dc0b91f9โฆ
Size
28.1 MB
Last updated
about 1 year ago
docker pull bbdrummer/dummy-responder