title: How do I configure a python server for POST?
body: <p>I'm trying out some PHP on my pc and made a little python server to host the files, one problem:
  It can't do POST, I always get the error 501. I've heard that you can implement POST in these servers, but I didn't find how to do this, can someone help?</p>
  <p>Here's my current server:</p>
  <pre class="lang-py prettyprint-override"><code>import http.server
  import socketserver
  
  PORT = 8080
  Handler = http.server.SimpleHTTPRequestHandler
  
  with socketserver.TCPServer((&quot;&quot;, PORT), Handler) as httpd:
      print(&quot;serving at port&quot;, PORT)
      httpd.serve_forever()
  </code></pre>