aboutsummaryrefslogtreecommitdiff
path: root/http.go
diff options
context:
space:
mode:
Diffstat (limited to 'http.go')
-rw-r--r--http.go28
1 files changed, 16 insertions, 12 deletions
diff --git a/http.go b/http.go
index c02c123..2c64348 100644
--- a/http.go
+++ b/http.go
@@ -1,24 +1,28 @@
package sleepy
+import (
+ "net/url"
+)
+
type (
- GetNotSupported struct {}
- PostNotSupported struct {}
- PutNotSupported struct {}
- DeleteNotSupported struct {}
+ GetNotSupported struct{}
+ PostNotSupported struct{}
+ PutNotSupported struct{}
+ DeleteNotSupported struct{}
)
-func (GetNotSupported) Get(map[string][]string) string {
- return "Nope."
+func (GetNotSupported) Get(values ...url.Values) (int, interface{}) {
+ return 405, map[string]string{"error": "Not implemented"}
}
-func (PostNotSupported) Post(map[string][]string) string {
- return "Nope."
+func (PostNotSupported) Post(values ...url.Values) (int, interface{}) {
+ return 405, map[string]string{"error": "Not implemented"}
}
-func (PutNotSupported) Put(map[string][]string) string {
- return "Nope."
+func (PutNotSupported) Put(values ...url.Values) (int, interface{}) {
+ return 405, map[string]string{"error": "Not implemented"}
}
-func (DeleteNotSupported) Delete(map[string][]string) string {
- return "Nope."
+func (DeleteNotSupported) Delete(values ...url.Values) (int, interface{}) {
+ return 405, map[string]string{"error": "Not implemented"}
}
bgstack15