patx/wred
Format response examples as a bulleted list
Commit cd0a5a4 · patx · 2026-10-24T22:33:58-04:00
Comments
No comments yet.
Diff
diff --git a/README.md b/README.md
index 3d14a1c..b660268 100644
--- a/README.md
+++ b/README.md
@@ -147,18 +147,18 @@ and values are Latin-1-encoded. Order and repeated headers such as `Set-Cookie`
are preserved. Use `[]` to send no headers.
-`{'hello': 'world'}` -> JSON object, 200 |
-`[{'id': 1}, {'id': 2}]` -> JSON array, 200 |
-`42` -> JSON number `42`, 200 |
-`'hello'` -> JSON string `"hello"`, 200 |
-`True` -> JSON boolean `true`, 200 |
-`None` -> JSON `null`, 200 |
-`b'hello'` -> Raw bytes, `application/octet-stream`, 200
-`(b'hello', [('Content-Type', 'text/plain')], 200)` -> Raw text, 200
-`({'id': 3}, [('Content-Type', 'application/json'), ('Location', '/items/3')], 201)` -> JSON with a location header, 201
-`({'error': 'Invalid'}, [('Content-Type', 'application/problem+json')], 400)` -> JSON with a custom media type, 400
-`(b'', [('Location', '/')], 303)` -> Redirect with an empty body
-`(b'', [], 204)` -> No content, no headers
+* `{'hello': 'world'}` -> JSON object, 200 |
+* `[{'id': 1}, {'id': 2}]` -> JSON array, 200 |
+* `42` -> JSON number `42`, 200 |
+* `'hello'` -> JSON string `"hello"`, 200 |
+* `True` -> JSON boolean `true`, 200 |
+* `None` -> JSON `null`, 200 |
+* `b'hello'` -> Raw bytes, `application/octet-stream`, 200
+* `(b'hello', [('Content-Type', 'text/plain')], 200)` -> Raw text, 200
+* `({'id': 3}, [('Content-Type', 'application/json'), ('Location', '/items/3')], 201)` -> JSON with a location header, 201
+* `({'error': 'Invalid'}, [('Content-Type', 'application/problem+json')], 400)` -> JSON with a custom media type, 400
+* `(b'', [('Location', '/')], 303)` -> Redirect with an empty body
+* `(b'', [], 204)` -> No content, no headers
Tuples are always interpreted as explicit responses. To return a tuple as JSON
array data, use a list or place it inside a response tuple, such as