Created
August 17, 2018 11:31
-
-
Save fukamachi/d04afa8c0b4b0375bf0a485b4e70652a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ql:quickload '(:clack :http-body)) | |
(defvar *handler*) | |
(setf *handler* | |
(clack:clackup (lambda (env) | |
(if (eq (getf env :request-method) :get) | |
'(200 (:content-type :text-html) | |
("<html><head></head><body><form method='post' enctype='multipart/form-data'><input type='file' name='upload'><input type='submit' value='Upload'></form></body></html>")) | |
`(200 () (,(prin1-to-string (http-body:parse (getf env :content-type) (getf env :content-length) (getf env :raw-body))))))) | |
:server :woo)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Content BodyのパースでLack.Requestを使うバージョン