From 9b90c8cdd47f7e1e9d73fb7d7cf55575a0a8c4ce Mon Sep 17 00:00:00 2001 From: Jeremy Saenz Date: Tue, 12 Nov 2013 07:34:06 -0800 Subject: [PATCH] Fixed up example --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8235cf4..ef480f2 100644 --- a/README.md +++ b/README.md @@ -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) } }) ~~~