iron/router — pull request #22 by AranHase (2014-07-18 04:29:51+00:00)
Title: route now takes the method in consideration

Hi,

In others frameworks (Play for example) we can use the same URI with different methods (GET and POST for example).

I made a little test program to try this in iron: http://pastebin.com/GRtmtk9T
By executing it I get the following results:

$ curl -X POST http://localhost:3000/method
POST
$ curl -X GET http://localhost:3000/method
POST

As can be seen, both POST and GET gets mapped to the same handler.

I'm creating a pull request that adds an extra method comparison to determine which handler to execute. (I'm a rust and iron newbie).