title: Escaping string in json dictionary python request
body: <p>So I've got a python application that is using requests.post to make a post request with json headers, body info, etc.</p>
  
  <p>Problem is that in my dictionary that gets sent as headers, I have a variable that often contains character groups like %25"" or "%2F", etc. I've seen this cause problems before if sent in body data, but that can be fixed by sending the body data as a sting rather than a dictionary. Haven't figured out how to make this work with the headers though, as you can't simply delimit the parameters with an ampersand like in body data.</p>
  
  <p>How do I make sure that my cookie value is not altered in the process of the post request?</p>
  
  <p>For instance, headers :
  Host : blahblah.com
  Connection : Keep-Alive
  Cookie : <strong><em>My sensitive string with special characters</em></strong>
  etc.</p>
  
  <p>Note : Nothing server-side can be changed. The python application is being used for hired pentesting services.</p>