Skip to content

Commit

Permalink
Fixed up example
Browse files Browse the repository at this point in the history
  • Loading branch information
codegangsta committed Nov 12, 2013
1 parent 50e67e9 commit 9b90c8c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,8 @@ Middleware Handlers work really well for things like logging, authorization, aut
~~~ go
// validate an api key
m.Use(func(res http.ResponseWriter, req *http.Request) {
if req.Header().Get("X-API-KEY") != "secret123" {
res.WriteHead(http.StatusUnauthorized)
if req.Header.Get("X-API-KEY") != "secret123" {
res.WriteHeader(http.StatusUnauthorized)
}
})
~~~
Expand Down

0 comments on commit 9b90c8c

Please sign in to comment.