here is my web server class :
import http.server
import socketserver
class WebHandler(http.server.BaseHTTPRequestHandler):
def parse_POST(self):
http.server
only exists in Python 3. In Python 2, you should use the BaseHTTPServer module:
from BaseHTTPServer import BaseHTTPRequestHandler
should work just fine.
In python earlier than v3 you need to run http server as
python -m SimpleHTTPServer 8069
#(8069=portnumber on which your python server is configured)
like @Sami said: you need earlier versions of python (2.7) - if you're running on Linux you need to "apt install python-minimal" - when launching the server "python2 -m SimpleHTTPServer 8082" [or any other port]. By default, python will launch it on 0.0.0.0 which actually is 127.0.0.1:8082 [or your specific port]
Happy hacking
PS when you have 2 versions of python, you need to specify every time you run a command, "python2" or "python3"