Email or username:

Password:

Forgot your password?
Top-level
DopeGhoti

@J12t
The http.server package might fit the bill.

import http.server
import socketserver
PORT = 8080

Handler = http.server.SimpleHTTPRequestHandler
with socketserver.TCPServer( ("", PORT), Handler) as httpd:
print( "Serving on port", PORT )
httpd.serve_forever()
3 comments
Johannes Ernst

@DopeGhoti does it speak http 2? I could see anything about that in docs.

DopeGhoti

@J12t the --protocol argument should allow you to set it. I'm constrained to my work environment right now so can't test to verify that you can use --protocol HTTP/2.0 as well as 1.0 and 1.1.

Go Up