I form a mail request.
mydict = {'key1': 'value@1', 'key2': 'value@2'} encoded_dict = urllib.urlencode(mydict)
This will lead to
key1=value%401&key2=value%402
I really want
key1=value@1&key2=value@2
Any other way of doing this?
If you want to do your job, you will have to write your own encoder. eg:
mydict = {'key1': 'value@1', 'key2': 'value@2'} >>> "&".join("{}={}".format(*i) for i in mydict.items()) 'key2=value@2&key1=value@1'
But why not just use JSON?
Source: https://habr.com/ru/post/1598323/More articles:Need help Converting jQuery event to Drupal behavior - javascriptRender controller in TWIG and display form errors - phpЯ не получаю HTML-тег при разборе - perlSQL Join tables with constants - sqlStd :: transform generalization - c ++Best practice for logging in to user app lo4j / net - loggingRun Selenium Python Script on a remote server - pythonWoocommerce product publishes, updates and removes hooks - wordpressHow to lock focus in a dialog? - javascriptHow to create a minimal daemon process in swift 2 command line tool? - xcodeAll Articles