Other HTTP Headers [Universal Feed Parser]
Keywords: RSS, Atom, CDF, XML, feed, parser, Python

# Universal Feed Parser

Parse RSS and Atom feeds in Python. 3000 unit tests. Open source.

- Download ·
- Documentation ·
- Unit tests ·
- Report a bug

## Other HTTP Headers

###

When you download a feed from a remote web server, Universal Feed Parser exposes the complete set of HTTP headers as a dictionary.

### Example: Accessing other HTTP headers

    >>> import feedparser
    >>> d = feedparser.parse('http://feedparser.org/docs/examples/atom03.xml')
    >>> d.headers
    {'date': 'Fri, 11 Jun 2004 23:57:50 GMT',
     'server': 'Apache/2.0.49 (Debian GNU/Linux)',
     'last-modified': 'Fri, 11 Jun 2004 23:00:34 GMT',
     'etag': '"6c132-941-ad7e3080"',
     'accept-ranges': 'bytes',
     'vary': 'Accept-Encoding,User-Agent',
     'content-encoding': 'gzip',
     'content-length': '883',
     'connection': 'close',
     'content-type': 'application/xml'}

← Password-Protected Feeds
Annotated Examples →