diff options
Diffstat (limited to 'lazybones.lisp')
-rw-r--r-- | lazybones.lisp | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/lazybones.lisp b/lazybones.lisp index 9bd3014..e762f03 100644 --- a/lazybones.lisp +++ b/lazybones.lisp @@ -43,19 +43,8 @@ definition." (push (cons mimetype decoder) *decoders*))) -(defun read-body-to-string (stream content-length) - "Reads CONTENT-LENGTH characters from STREAM and returns a string." - (let ((string (make-string content-length))) - (read-sequence string stream) - string)) -(defun decode-json-body (stream len) - "Reads LEN characters from stream and decodes them as JSON, returning a PLIST" - (jonathan:parse (read-body-to-string stream len))) - -(add-decoder "application/json" #'decode-json-body) - (defun decode-body (stream content-type content-length) "Decodes the body according to the Content-Type header. |