forms
Module¶
-
class
restkit.forms.
BoundaryItem
(name, value, fname=None, filetype=None, filesize=None, quote=<function url_quote>)¶ Bases:
object
-
encode
(boundary)¶ Returns the string encoding of this parameter
-
encode_hdr
(boundary)¶ Returns the header of the encoding of this parameter
-
encode_unreadable_value
(value)¶
-
iter_encode
(boundary, blocksize=16384)¶
-
-
class
restkit.forms.
MultipartForm
(params, boundary, headers, bitem_cls=<class 'restkit.forms.BoundaryItem'>, quote=<function url_quote>)¶ Bases:
object
-
get_size
(recalc=False)¶
-
-
restkit.forms.
form_encode
(obj, charset='utf8')¶
-
restkit.forms.
multipart_form_encode
(params, headers, boundary, quote=<function url_quote>)¶ Creates a tuple with MultipartForm instance as body and dict as headers
- params
- dict with fields for the body
- headers
- dict with fields for the header
- boundary
- string to use as boundary
- quote (default: url_quote)
- some callable expecting a string an returning a string. Use for quoting of boundary and form-data keys (names).