<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>.gitignore</filename>
    </added>
    <added>
      <filename>demo/views/greeter.erb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -21,6 +21,11 @@ app = Nyane.new do
     erb :welcome, :layout =&gt; false
   end
 
+  post '/greeter' do
+    @name = @params[&quot;name&quot;]
+    erb :greeter
+  end
+
   get &quot;/echo/(.*)&quot; do |text|
     &quot;#{text}&quot;
   end</diff>
      <filename>demo/example.ru</filename>
    </modified>
    <modified>
      <diff>@@ -1 +1,8 @@
-&lt;h1&gt;Welcome!&lt;/h1&gt;
\ No newline at end of file
+&lt;h1&gt;Welcome!&lt;/h1&gt;
+
+&lt;form action=&quot;greeter&quot; method=&quot;post&quot;&gt;
+  &lt;label for=&quot;name&quot;&gt;What's your name?&lt;/label&gt;
+  &lt;input type=&quot;text&quot; name=&quot;name&quot; id=&quot;name&quot;&gt;
+
+  &lt;p&gt;&lt;input type=&quot;submit&quot; value=&quot;Continue&quot;&gt;&lt;/p&gt;
+&lt;/form&gt;
\ No newline at end of file</diff>
      <filename>demo/views/welcome.erb</filename>
    </modified>
    <modified>
      <diff>@@ -12,18 +12,23 @@ class Nyane
   end
 
   def get(route, &amp;block)
-    @actions &lt;&lt; [route, block]
+    @actions &lt;&lt; [route, :get, block]
   end
 
+  def post(route, &amp;block)
+    @actions &lt;&lt; [route, :post, block]
+  end
+  
   def call(env)
     @request = Rack::Request.new(env)
     @response = Rack::Response.new
     
-    params = nil
-    action = @actions.detect { |route, block| params = env[&quot;PATH_INFO&quot;].match(Regexp.new(&quot;^\/?#{route}\/?$&quot;)) }
+    @params = @request.params
+    path_info = nil
+    action = @actions.detect { |route, method, block| @request.request_method == method.to_s.upcase! &amp;&amp; path_info = @request.path_info.match(Regexp.new(&quot;^\/?#{route}\/?$&quot;)) }
 
     if action
-      @response.write(action.last.call(*params[1..-1]))
+      @response.write(action.last.call(path_info[1..-1]))
     else
       @response.write(&quot;Not found&quot;)
       @response.status = 404</diff>
      <filename>lib/nyane.rb</filename>
    </modified>
    <modified>
      <diff>@@ -20,4 +20,18 @@ describe &quot;GET&quot; do
   it &quot;should render any text&quot; do
     @app.mock.get(&quot;/text&quot;).body.should == &quot;Text&quot;
   end
+end
+
+describe &quot;POST&quot; do
+  before do
+    @app = Nyane.new do
+      post &quot;/&quot; do
+        &quot;#{@params.inspect}&quot;
+      end
+    end
+  end
+
+  it &quot;should capture POST parameters&quot; do
+    @app.mock.post(&quot;/&quot;, :input =&gt; &quot;text=Nyane&quot;).body.should == { &quot;text&quot; =&gt; 'Nyane' }.inspect
+  end
 end
\ No newline at end of file</diff>
      <filename>spec/app_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -22,6 +22,10 @@ describe &quot;routing&quot; do
       get &quot;/echo/(.*)&quot; do |text|
         &quot;#{text}&quot;
       end
+      
+      post &quot;/post&quot; do
+        &quot;post&quot;
+      end
     end
   end
 
@@ -38,8 +42,12 @@ describe &quot;routing&quot; do
     @app.mock.get(&quot;/path&quot;).body.should == &quot;/path&quot;
   end
 
+  it &quot;should route /post&quot; do
+    @app.mock.post(&quot;/post&quot;).body.should == &quot;post&quot;
+  end
+
   it &quot;should route /param/:param&quot; do
-    @app.mock.get(&quot;/param/ohaie&quot;).body.should == &quot;ohaie&quot;
+    @app.mock.get(&quot;/param/hello&quot;).body.should == &quot;hello&quot;
   end
 
   it &quot;should route with no leading slash&quot; do    </diff>
      <filename>spec/routing_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>d8143d86dac5c3b1da8a6b7db65bd052d38c20ac</id>
    </parent>
  </parents>
  <author>
    <name>Arthur Zapparoli</name>
    <email>arthurzap@gmail.com</email>
  </author>
  <url>http://github.com/arthurgeek/nyane/commit/8bb8e3c60aad67fd45e4cedf669c31d1bf5bc5c5</url>
  <id>8bb8e3c60aad67fd45e4cedf669c31d1bf5bc5c5</id>
  <committed-date>2008-12-19T22:37:41-08:00</committed-date>
  <authored-date>2008-12-19T20:57:58-08:00</authored-date>
  <message>Implemented POST support :)</message>
  <tree>4661ba59b969c4235eee859401478190174b6fff</tree>
  <committer>
    <name>Arthur Zapparoli</name>
    <email>arthurzap@gmail.com</email>
  </committer>
</commit>
