Skip to content

WSGI middleware for capture and browse requests and responses

License

Notifications You must be signed in to change notification settings

humanzilla/wsgi-listenme

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wsgi-listenme documentation

WSGI middleware for capture and browse requests and responses

Install

pip install listenme

Usage

In your wsgi.py file your WSGI application with our middleware.

from listenme import ListenMeMiddleware

def application(environ, start_response):
    response_body = 'Hello Mundo!'
    status = '200 OK'
    response_headers = [
        ('Content-Type', 'text/plain'), ('Content-Length', str(len(response_body)))
    ]
    start_response(status, response_headers)
    return [response_body]

application = ListenMeMiddleware(application, publish="/tmp/listenme.socket")

Start your application and start:

listenme --listen /tmp/listenme.socket --http :8000

Open your browser at http://localhost:8000 and browse the requests and responses

About

WSGI middleware for capture and browse requests and responses

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages