Minimal HTTP-based in-memory key/value cache for arbitrary payloads (files, images, JSON, text, binary).
A tiny REST service that lets you store and retrieve raw byte blobs or text under simple string keys. Key features:
- Lightweight: zero external dependencies
- Fast: fully in-memory storage
- Flexible: preserves your
Content-Typeheaders - Ephemeral: data lives only while the process runs
Use cases include prototyping static asset hosting, quick config or secret caching, demo setups, or local development.
- Clone the repository
- Change into the
srcfolder - Run:
dotnet run
- The service listens on
http://localhost:5000
- Endpoint:
/{key}
Example: store a text value
curl -X POST http://localhost:5000/greeting \
-H "Content-Type: text/plain" \
-d "Hello, World!"Example: store an image
curl -X POST --data-binary @path/to/image.png \
http://localhost:5000/my-image \
-H "Content-Type: image/png"Example: store JSON data
curl -X POST http://localhost:5000/my-json \
-H "Content-Type: application/json" \
-d '{"hello": "world"}'- Endpoint:
/{key}
Example: download text
curl http://localhost:5000/greeting
# Outputs: Hello, World!Example: download image
curl http://localhost:5000/my-image \
--output downloaded.pngExample: retrieve JSON data
curl http://localhost:5000/my-json
# Outputs: {"hello": "world"}Example: retrieve XML data
curl http://localhost:5000/my-xml
# Outputs: <greeting>Bonjour, le monde!</greeting>- Endpoint:
/{key}
Example:
curl -X DELETE http://localhost:5000/greeting
# Returns: Removed 'greeting'For a full suite of examples (files, images, JSON, text, binary), see the tests directory.
## Responses
- `200 OK`: operation succeeded
- `404 Not Found`: key does not exist