Analysis updated 2026-07-03
Look up the correct sequence of checks a server must perform before returning a 304 Not Modified response
Debug an API returning the wrong HTTP status code by tracing through the decision diagram step by step
Embed the JSON export of the diagram in an automated test suite to validate that your server returns the right status codes
| for-get/http-decision-diagram | experience-monks/devtool | fomantic/fomantic-ui | |
|---|---|---|---|
| Stars | 3,749 | 3,748 | 3,750 |
| Language | JavaScript | JavaScript | JavaScript |
| Setup difficulty | easy | moderate | easy |
| Complexity | 1/5 | 2/5 | 2/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
No installation needed, download the PNG or SVG for immediate use as a reference diagram.
When a web server responds to a browser or app request, it sends back a status code like 200 (success), 404 (not found), or 304 (use your cached copy). Choosing the right status code, and setting the right combination of headers to go with it, requires following a long chain of rules defined in the HTTP specification. This project makes that decision chain visible as a flowchart. The http-decision-diagram repository contains an activity diagram that maps out exactly how a server should determine which HTTP response code to send, step by step, based on the request it received and the headers involved. The diagram follows the official HTTP specifications (RFC7230 through RFC7235) and is meant as a reference for developers building or debugging HTTP servers and APIs. The diagram is available in visual formats (PNG, JPEG, SVG) for easy reading and in JSON format for use in code. The source is written in a format called Cosmogol, which is a language for describing finite state machines. The project also includes two companion diagrams specifically for HTTP caching: one for deciding whether to store a response in cache, and another for deciding whether to serve a cached response to an incoming request. The project is part of a broader initiative called for-GET HTTP, which aims to produce well-documented, specification-faithful tools for working with the HTTP protocol. The README is brief, but it links to fuller documentation in a separate doc folder. The license is Apache 2.0.
A visual flowchart that maps out exactly which HTTP status code a server should return and why, following the official HTTP specifications step by step, with companion diagrams for caching decisions.
Mainly JavaScript. The stack also includes JavaScript, Cosmogol, SVG.
Use freely for any purpose, including commercial, as long as you preserve the copyright and license notice.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.