aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoin Okay <cbeok@protonmail.com>2020-04-24 21:14:34 -0500
committerCoin Okay <cbeok@protonmail.com>2020-04-24 21:14:34 -0500
commitc0fcd06e00c2f4d841040e5de737b2d9e5d5c681 (patch)
tree218f8e837bcf80c3acc841bc093a97f6f55b544b
parent1695fb6d2ac4995e053bee9dcdd9db6d8257f464 (diff)
renamed decoders for consistent naming scheme.
-rw-r--r--decoders.lisp9
1 files changed, 5 insertions, 4 deletions
diff --git a/decoders.lisp b/decoders.lisp
index 1e282e2..c75a323 100644
--- a/decoders.lisp
+++ b/decoders.lisp
@@ -1,3 +1,4 @@
+;;;; lazybones.decoders package.
(in-package #:lazybones.decoders)
@@ -30,21 +31,21 @@
;;; PLAIN TEXT DECODER
-(defun decode-plain-text (stream content-type content-length)
+(defun decode-text/plain (stream content-type content-length)
(declare (ignore content-type))
(read-body-to-string stream content-length))
-(add-decoder "text/plain" #'decode-plain-text)
+(add-decoder "text/plain" #'decode-text/plain)
;;; JSON DECODER
-(defun decode-json-body (stream content-type content-length)
+(defun decode-application/json (stream content-type content-length)
"Reads LEN characters from stream and decodes them as JSON, returning a PLIST"
(declare (ignore content-type))
(jonathan:parse (read-body-to-string stream content-length)))
-(add-decoder "application/json" #'decode-json-body)
+(add-decoder "application/json" #'decode-application/json)
;;; MULTIPART/FORM-DATA DECODER