code: def x_www_form_urlencoded(post_data):
      
      if isinstance(post_data, dict):
          return "&".join([
              u"{}={}".format(key, value)
              for key, value in post_data.items()
          ])
      else:
          return post_data
docs: convert origin dict to x-www-form-urlencoded
  
      Args:
          post_data (dict):
              {"a": 1, "b":2}
  
      Returns:
          str:
              a=1&b=2