Skip to main content

Debug headers (and bodies) of WSGI requests and responses

Project description

This WSGI middleware will display the headers of the incoming request and the outgoing response. You can also optionally display the request or response body.

Use it like this:

from debugheaders import DebugHeaders

def application(environ, start_response):
    blah blah blah

application = DebugHeaders(application,
                           show_body=True, show_response_body=True,
                           output='wsgi.errors')

show_body shows the request body, show_response_body does what you would expect, and this information is written to the stream given by output (defaults to stdout, can be any object with a .write() method, and ‘wsgi.errors’ is special and means to write to environ['wsgi.errors']).

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

DebugHeaders-0.1.tar.gz (2.7 kB view details)

Uploaded Source

File details

Details for the file DebugHeaders-0.1.tar.gz.

File metadata

  • Download URL: DebugHeaders-0.1.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for DebugHeaders-0.1.tar.gz
Algorithm Hash digest
SHA256 0496f009b987c18648caa88be4cf4e89b2a6b934c36d5914108c9def81ff66d2
MD5 8bf2bf4f86447eb48dd0039c6d3f959f
BLAKE2b-256 db0e36de6e0ef79dc63255ad9ac3e161ff1599d67d68594780f757629e50af4e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page