aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoin Okay <cbeok@protonmail.com>2020-04-22 21:33:24 -0500
committerCoin Okay <cbeok@protonmail.com>2020-04-22 21:33:24 -0500
commit9d5bb80a895e137cf3dde2ee14e1edeaaecbac82 (patch)
tree229a93af64aef2a45cf8f61aa55cede9c2fd67f8
parent7738e11fe80112e4f132379b00d6e7a2afea826a (diff)
in case anybody posts raw text
-rw-r--r--decoders.lisp9
1 files changed, 9 insertions, 0 deletions
diff --git a/decoders.lisp b/decoders.lisp
index e4dcc8c..fecb83a 100644
--- a/decoders.lisp
+++ b/decoders.lisp
@@ -8,6 +8,15 @@
string))
+;;; PLAIN TEXT DECODER
+
+(defun decode-plain-text (stream content-type content-length)
+ (declare (ignore content-type))
+ (read-body-to-string stream content-length))
+
+(add-decoder "text/plain" #'decode-plain-text)
+
+
;;; JSON DECODER
(defun decode-json-body (stream content-type content-length)