Skip to content

Instantly share code, notes, and snippets.

@lagagain
Created July 1, 2019 16:09
Show Gist options
  • Select an option

  • Save lagagain/8b08d112e4a5fba8a559046f461a2a9e to your computer and use it in GitHub Desktop.

Select an option

Save lagagain/8b08d112e4a5fba8a559046f461a2a9e to your computer and use it in GitHub Desktop.
An Example for HTTP Server with Built-in python3
from http.server import HTTPServer
from http.server import BaseHTTPRequestHandler
class MyHTTPRequestHandler(BaseHTTPRequestHandler):
def do_GET(self):
print(self.path)
print(self.command)
self.wfile.write(b"Hello World")
server = HTTPServer(("0.0.0.0",8000), MyHTTPRequestHandler)
server.serve_forever()
@lagagain
Copy link
Author

lagagain commented Jul 1, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment