Skip to content

Commit

Permalink
added 501 not implemented.
Browse files Browse the repository at this point in the history
  • Loading branch information
diasbruno committed Jan 16, 2025
1 parent dc68723 commit 094df77
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion routing/package.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
#:route-path
#:with-request-params
#:with-response-data
#:with-request-data))
#:with-request-data
#:not-implemented))

(in-package :wst.routing)
6 changes: 6 additions & 0 deletions routing/responses.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,9 @@
CONTENT is any object that is serialized accourding to the type.")
(:method ((ty t) response &key)
(write-response response :status 422 :content "unprocessable entity")))

(defgeneric not-implemented (ty response &key)
(:documentation "Build a response for a type TY (:json, :html, t = html).
CONTENT is any object that is serialized accourding to the type.")
(:method ((ty t) response &key)
(write-response response :status 501 :content "not implemented")))

0 comments on commit 094df77

Please sign in to comment.