http - How to Form-encode a dictionary in Python? -
i interacting rest api , need explicitly form-encode request body before sending.
the urllib module has urlencode
method, see no equivalent form-encode, presumably dictionaries automatically encoded when using urllib post request.
is there built in method can use form-encode object? example:
params={'f':'json','type':'map'} post_body = formencode(params)
producing post_body:
f=json type=map
in instance i'm using winhttprequest through win32com module can take care of authentication natively don't need handle credentials in script.
Comments
Post a Comment