A lightweight service that allows developers to test and simulate HTTP status codes for application development and testing.
HTTP Codes On Demand is a simple PHP web service that returns any valid HTTP status code on request. It provides:
- Response with the exact HTTP status code requested
- HTML page displaying the requested status code, description, and official specification link
- Support for all standard HTTP status codes (1xx, 2xx, 3xx, 4xx, 5xx)
-
Start the service:
docker-compose up -d
-
Request a specific HTTP status code:
http://localhost/?code=404
-
The service will:
- Set the actual HTTP response status to the requested code
- Display an information page with details about the requested status code
- Testing error handling in applications
- Simulating API responses with specific status codes
- Educational purposes to learn about HTTP status codes
- Validating client-side HTTP error handling
You can directly use the official Docker image:
docker run -d -p 80:80 roura/http-codes-ondemand
Service will be available at http://localhost
Requires Docker and Docker Compose.
git clone https://github.com/rouralberto/http_codes_ondemand.git
cd http_codes_ondemand
docker-compose up -d
Service will be available at http://localhost