aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorDoug Black <doug@dougblack.io>2014-03-29 23:13:46 -0700
committerDoug Black <doug@dougblack.io>2014-03-29 23:13:46 -0700
commita59d2f63e6ffceff251e2d14eb313f33f0ea148e (patch)
treef90238cd5c97b5b818ed43b9ceee3f09140de70a /README.md
parentMerge pull request #16 from dmathieu/setup_ci (diff)
parentUpdated type in the README (diff)
downloadsleepy-a59d2f63e6ffceff251e2d14eb313f33f0ea148e.tar.gz
sleepy-a59d2f63e6ffceff251e2d14eb313f33f0ea148e.tar.bz2
sleepy-a59d2f63e6ffceff251e2d14eb313f33f0ea148e.zip
Merge pull request #17 from oleksandr/master
Added access to request headers and ability to specify response headers.
Diffstat (limited to 'README.md')
-rw-r--r--README.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/README.md b/README.md
index 5794d22..4c5ceb7 100644
--- a/README.md
+++ b/README.md
@@ -14,10 +14,10 @@ import (
type Item struct { }
-func (item Item) Get(values url.Values) (int, interface{}) {
+func (item Item) Get(values url.Values, headers map[string][]string) (int, interface{}, map[string][]string) {
items := []string{"item1", "item2"}
data := map[string][]string{"items": items}
- return 200, data
+ return 200, data, map[string][]string{"Content-type": {"application/json"}}
}
func main() {
bgstack15