From c0fcd06e00c2f4d841040e5de737b2d9e5d5c681 Mon Sep 17 00:00:00 2001 From: Coin Okay Date: Fri, 24 Apr 2020 21:14:34 -0500 Subject: renamed decoders for consistent naming scheme. --- decoders.lisp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'decoders.lisp') 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 -- cgit v1.2.3