Skip to content

izypay/simple-http-logger

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Python Server Logger

A simple HTTP server that logs all GET and POST requests together with their parameters. Using default port 8080. The solution was based on this gist

How to Run

Python

./server.py [<port>]

Docker

sudo docker build -t server .
sudo docker run -it --rm -p <port>:8080 server

Docker (from Docker Hub)

sudo docker run -it --rm -p 80:8080 cycodelabs/simple-http-logger

Results

Run this on another session:

curl --data 'foo=bar' localhost:80

And watch the request on your server:

Host: localhost
User-Agent: curl/7.68.0
Accept: */*
Content-Length: 7
Content-Type: application/x-www-form-urlencoded

foo=bar

172.17.0.1 - - [01/Aug/2022 07:07:58] "POST / HTTP/1.1" 200 -

About

Simple HTTP server that logs requests

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 95.7%
  • Dockerfile 4.3%