title: Getting 405 Method Not Allowed while using POST method in bottle
body: <p>I am developing one simple code for force download now problem is that i'm not getting any error in GET method but getting error "405 Method Not Allowed" in post method request. My code for GET method.</p>
  
  <pre><code>@route('/down/&lt;filename:path&gt;',method=['GET', 'POST'])
      def home(filename):
          key = request.get.GET('key')
          if key == "tCJVNTh21nEJSekuQesM2A":        
              return static_file(filename, root='/home/azoi/tmp/bottle/down/', download=filename)
          else:
      return "File Not Found"
  </code></pre>
  
  <p>When i request with key it is returning me file for download when it is get method
  <a href="http://mydomain.com/down/xyz.pdf?key=tCJVNTh21nEJSekuQesM2A" rel="noreferrer">http://mydomain.com/down/xyz.pdf?key=tCJVNTh21nEJSekuQesM2A</a></p>
  
  <p>Now i used another code for handling POST methods</p>
  
  <pre><code>@route('/down/&lt;filename:path&gt;',method=['GET', 'POST'])
      def home(filename):
          key = request.body.readline()
          if key == "tCJVNTh21nEJSekuQesM2A":        
              return static_file(filename, root='/home/azoi/tmp/bottle/down/', download=filename)
          else:
              return "File Not Found"
  </code></pre>
  
  <p>Now by using this code i cannot handle post method i.e. i am getting 405 Method Not Allowed error from server.</p>
  
  <p>Any solution for this ?</p>