Python Forum

Full Version: CGIHTTPRequestHandler and rest
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hi all, how can I manage rest calls to this code?

#!/usr/bin/env python3

from http.server import CGIHTTPRequestHandler, HTTPServer

handler = CGIHTTPRequestHandler
handler.cgi_directories = ['/cgi-bin', '/htbin']
server = HTTPServer(('localhost', 8080), handler)
server.serve_forever()