diff options
Diffstat (limited to 'http.go')
-rw-r--r-- | http.go | 28 |
1 files changed, 16 insertions, 12 deletions
@@ -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"} } |