Skip to content

Instantly share code, notes, and snippets.

View ashishpatel1992's full-sized avatar

Ashish Patel ashishpatel1992

View GitHub Profile
@ashishpatel1992
ashishpatel1992 / server.py
Last active December 24, 2021 07:01 — forked from mdonkers/server.py
Simple Python 3 HTTP server for logging all GET and POST requests
#!/usr/bin/env python3
"""
Very simple HTTP server in python for logging requests
Usage::
./server.py [<port>]
"""
from http.server import BaseHTTPRequestHandler, HTTPServer
import logging
class S(BaseHTTPRequestHandler):