![]() |
Qucs-S S-parameter Viewer & RF Synthesis Tools
|


Public Member Functions | |
| __init__ (self, headers=None, **kwargs) | |
| __setitem__ (self, key, val) | |
| __getitem__ (self, key) | |
| __delitem__ (self, key) | |
| __contains__ (self, key) | |
| __eq__ (self, other) | |
| __ne__ (self, other) | |
| __len__ (self) | |
| __iter__ (self) | |
| pop (self, key, default=__marker) | |
| discard (self, key) | |
| add (self, key, val) | |
| extend (self, *args, **kwargs) | |
| getlist (self, key, default=__marker) | |
| __repr__ (self) | |
| copy (self) | |
| iteritems (self) | |
| itermerged (self) | |
| items (self) | |
| from_httplib (cls, message) | |
Static Public Attributes | |
| iterkeys = MutableMapping.iterkeys | |
| itervalues = MutableMapping.itervalues | |
| getheaders = getlist | |
| getallmatchingheaders = getlist | |
| iget = getlist | |
| get_all = getlist | |
Protected Member Functions | |
| _prepare_for_method_change (self) | |
| _copy_from (self, other) | |
Protected Attributes | |
| _container | |
:param headers:
An iterable of field-value pairs. Must not contain multiple field names
when compared case-insensitively.
:param kwargs:
Additional field-value pairs to pass in to ``dict.update``.
A ``dict`` like container for storing HTTP Headers.
Field names are stored and compared case-insensitively in compliance with
RFC 7230. Iteration provides the first case-sensitive key seen for each
case-insensitive pair.
Using ``__setitem__`` syntax overwrites fields that compare equal
case-insensitively in order to maintain ``dict``'s api. For fields that
compare equal, instead create a new ``HTTPHeaderDict`` and use ``.add``
in a loop.
If multiple fields that are equal case-insensitively are passed to the
constructor or ``.update``, the behavior is undefined and some will be
lost.
>>> headers = HTTPHeaderDict()
>>> headers.add('Set-Cookie', 'foo=bar')
>>> headers.add('set-cookie', 'baz=quxx')
>>> headers['content-length'] = '7'
>>> headers['SET-cookie']
'foo=bar, baz=quxx'
>>> headers['Content-Length']
'7'
|
protected |
Remove content-specific header fields before changing the request method to GET or HEAD according to RFC 9110, Section 15.4.
| pip._vendor.urllib3._collections.HTTPHeaderDict.add | ( | self, | |
| key, | |||
| val | |||
| ) |
Adds a (name, value) pair, doesn't overwrite the value if it already
exists.
>>> headers = HTTPHeaderDict(foo='bar')
>>> headers.add('Foo', 'baz')
>>> headers['foo']
'bar, baz'
| pip._vendor.urllib3._collections.HTTPHeaderDict.extend | ( | self, | |
| * | args, | ||
| ** | kwargs | ||
| ) |
Generic import function for any type of header-like object. Adapted version of MutableMapping.update in order to insert items with self.add instead of self.__setitem__
| pip._vendor.urllib3._collections.HTTPHeaderDict.from_httplib | ( | cls, | |
| message | |||
| ) |
Read headers from a Python 2 httplib message object.
| pip._vendor.urllib3._collections.HTTPHeaderDict.getlist | ( | self, | |
| key, | |||
default = __marker |
|||
| ) |
Returns a list of all the values for the named field. Returns an empty list if the key doesn't exist.
| pip._vendor.urllib3._collections.HTTPHeaderDict.iteritems | ( | self | ) |
Iterate over all header lines, including duplicate ones.
| pip._vendor.urllib3._collections.HTTPHeaderDict.itermerged | ( | self | ) |
Iterate over all headers, merging duplicate ones together.
| pip._vendor.urllib3._collections.HTTPHeaderDict.pop | ( | self, | |
| key, | |||
default = __marker |
|||
| ) |
D.pop(k[,d]) -> v, remove specified key and return the corresponding value. If key is not found, d is returned if given, otherwise KeyError is raised.