| |
- extract_namespace(key)
- Return the namespace in key or None, when no namespace is in key.
key -- String to get namespace from
- get_depth(depth, allowed=('0', '1', 'infinity'))
- Return string with depth.
depth -- Depth value to check.
allowed -- Iterable with allowed depth header values.
Raise ValueError, if an illegal depth was given.
- make_absolute(httpclient, uri)
- Return correct absolute URI.
httpclient -- HTTPClient instance with protocol, host and port attribute.
uri -- The destination path.
- make_multipart(content, default_encoding='ascii', with_filenames=False)
- Return the headers and content for multipart/form-data.
content -- Dict with content to POST. The dict values are expected to
be unicode or decodable with us-ascii.
default_encoding -- Send multipart with this encoding, if no special
encoding was given with the content. Default is ascii.
with_filenames -- If True, a multipart's files will be sent with the
filename paramenter set. Default is False.
|