Latest Version: 0.9.6.2

HeaderDict

This represents response headers. It handles the headers as a dictionary, with case-insensitive keys.

Also there is an .add(key, value) method, which sets the key, or adds the value to the current value (turning it into a list if necessary).

For passing to WSGI there is a .headeritems() method which is like .items() but unpacks value that are lists. It also handles encoding -- all headers are encoded in ASCII (if they are unicode).

@@: Should that encoding be ISO-8859-1 or UTF-8? I'm not sure what the spec says.


Methods

f __cmp__(...) ...

x.__cmp__(y) <==> cmp(x,y)

f __contains__(self, key) ...

f __delitem__(self, key) ...

f __eq__(...) ...

x.__eq__(y) <==> x==y

f __ge__(...) ...

x.__ge__(y) <==> x>=y

f __getitem__(self, key) ...

f __gt__(...) ...

x.__gt__(y) <==> x>y

f __init__(...) ...

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

f __iter__(...) ...

x.__iter__() <==> iter(x)

f __le__(...) ...

x.__le__(y) <==> x<=y

f __len__(...) ...

x.__len__() <==> len(x)

f __lt__(...) ...

x.__lt__(y) <==> x<y

f __ne__(...) ...

x.__ne__(y) <==> x!=y

f __setitem__(self, key, value) ...

f add(self, key, value) ...

f fromlist(cls, seq) ...

f get(self, key, failobj=None) ...

f has_key(self, key) ...

f headeritems(self) ...

f normalize(self, key) ...

f pop(self, key) ...

f setdefault(self, key, failobj=None) ...

f update(self, other) ...

See the source for more information.

Top