-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor http verbs into their own file
- Add patch verb - Add some documentation in docstrings. A definition of content-verb is missing.
- Loading branch information
Showing
3 changed files
with
32 additions
and
22 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
;;; HTTP Verbs | ||
|
||
(defpackage #:snooze-verbs | ||
(:use) | ||
(:export #:http-verb | ||
#:get | ||
#:patch | ||
#:post | ||
#:put | ||
#:delete | ||
#:content-verb | ||
#:receiving-verb | ||
#:sending-verb) | ||
(:documentation "The taxonomy of HTTP verbs used by snooze. In addition to the verbs themselves it groups verbs in content, sending and receiving verbs. Sending and Receiving are always from the server's perspective. Hence GET is sending to client and POST and PUT are receiving from client.")) | ||
|
||
(cl:defclass snooze-verbs:http-verb () ()) | ||
(cl:defclass snooze-verbs:delete (snooze-verbs:http-verb) ()) | ||
(cl:defclass snooze-verbs:content-verb (snooze-verbs:http-verb) ()) | ||
(cl:defclass snooze-verbs:receiving-verb (snooze-verbs:content-verb) () | ||
(:documentation "Indicates that the request carries information from the client to the server.")) | ||
(cl:defclass snooze-verbs:sending-verb (snooze-verbs:content-verb) () | ||
(:documentation "Indicates that the request is asking information from the server.")) | ||
(cl:defclass snooze-verbs:patch (snooze-verbs:receiving-verb) ()) | ||
(cl:defclass snooze-verbs:post (snooze-verbs:receiving-verb) ()) | ||
(cl:defclass snooze-verbs:put (snooze-verbs:receiving-verb) ()) | ||
(cl:defclass snooze-verbs:get (snooze-verbs:sending-verb) ()) |
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