aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Black <dougblack@gatech.edu>2014-01-23 22:20:13 -0800
committerDoug Black <dougblack@gatech.edu>2014-01-23 22:20:16 -0800
commit1972e898305c1c309ba301ffeab40ed477a4c904 (patch)
tree745b4465f742a982e6ba00611fd9af71a1cc9282
parentuse http.Request (diff)
downloadsleepy-1972e898305c1c309ba301ffeab40ed477a4c904.tar.gz
sleepy-1972e898305c1c309ba301ffeab40ed477a4c904.tar.bz2
sleepy-1972e898305c1c309ba301ffeab40ed477a4c904.zip
add readme
-rw-r--r--README.md33
1 files changed, 33 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..62aa8ac
--- /dev/null
+++ b/README.md
@@ -0,0 +1,33 @@
+## Sleepy
+
+#### A RESTful framework for Go
+
+Sleepy is not done yet. Here is a potential target API.
+
+```go
+
+import (
+ "net/http"
+ "sleepy"
+)
+
+type Item struct { }
+
+func (item *Item) Get(foo string, bar int) (interface{}, int, http.Headers) {
+ return map[string]int { foo : bar}, 200, nil
+}
+
+func main() {
+
+ item = new(Item)
+
+ var api = new(sleepy.Api)
+ api.AddResource(item, "/item")
+
+ request, _ := http.NewRequest("GET", "/item", nil)
+ fmt.Println(api.HandleRequest(request))
+
+}
+```
+
+Stay tuned.
bgstack15