1

I want to send an unencoded query string, with curly braces.

Internally httpx is wrapping the passed url in a httpx.URL object and percent encodes the curly braces and I need to send them unencoded. I tried passing the query string as the params field which still ended up encoded. I also tried setting the query attribute of the URL (url._uri_reference.query) but that leads to an error because the attribute is not accessible. Is there any way to get the httpx library to either not encode the URL or to use custom encoding?

Ralph Ritoch
  • 3,260
  • 27
  • 37
  • It's an odd request. The web server at the other end knows how to process encoded URLs and will deliver the correct value. What's on the other end? – Tim Roberts Oct 22 '21 at 06:16
  • @TimRoberts at this time I don't know. I'm still waiting for a response from their tech support. Ideally they would handle the encoding but there's no reason why the curly braces in the URL needs to be percent encoded per RFC3986 because they are not reserved characters. – Ralph Ritoch Oct 22 '21 at 06:28

0 Answers0