From 34dda194f9d4c1b526f3f3fe3045fcc0a61bf545 Mon Sep 17 00:00:00 2001 From: Eduardo Gurgel Date: Fri, 18 Apr 2014 14:12:09 +1200 Subject: [PATCH] Add integer constraint on code (status/:code) --- lib/httparrot.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/httparrot.ex b/lib/httparrot.ex index ff4ec3b..f33187a 100644 --- a/lib/httparrot.ex +++ b/lib/httparrot.ex @@ -12,7 +12,7 @@ defmodule HTTParrot do {'/put', HTTParrot.PHandler, []}, {'/patch', HTTParrot.PHandler, []}, {'/delete', HTTParrot.DeleteHandler, []}, - {'/status/:code', HTTParrot.StatusCodeHandler, []}, + {'/status/:code', [code: :int], HTTParrot.StatusCodeHandler, []}, {'/redirect/:n', HTTParrot.RedirectHandler, []}, {'/redirect-to', HTTParrot.RedirectToHandler, []}, {'/relative-redirect/:n', HTTParrot.RelativeRedirectHandler, []},