title: Python Requests: request stops working when an f string is used in the URL
body: <p>I am trying to make a POST request, pull a variable from the response, and pass that variable into a GET request using python requests lib.</p>
  <p>My problem is when I use an f string to pass that variable into the 2nd request, I receive a 500 response from the server. However, if I manually copy/paste the variable into the second request and run the program again (not using an f string), I get my 200 response and get the data I need.</p>
  <p>Here's what I mean:</p>
  <pre><code>        #First request:
          REQ = 'http://myURL.com/post-request'
          r = requests.post(REQ, headers=headers, data=data)
          #this returns a 200 response with my unique ID which I need to pass into the next request
      
          response = r.json() #convert it to json
          myId = response['uniqueId'] #let's say the ID is 12345
      
          REQ2 = f'http://myURL.com/get-request?uniqueId={myId}'
          r2 = requests.get(REQ2, headers=headers)
          #^this request returns a 500 response
      
          #However, If I make that same request again and just type my id 12345 directly into the url:
          REQ2 = 'http://myURL.com/get-request?uniqueId=12345'
          r2 = requests.get(REQ2, headers=headers)
          #I get a 200 response with the data I need.
  </code></pre>
  <p>I have also made sure the URL in both of these requests is actually a string, and I've tested to make sure <code>r2.url == REQ2</code> is <code>True</code>. I can't figure out why it doesn't work when I use the f string.</p>
  <p>I've also tried passing the variable using &quot;params=&quot; in my get request, as the Requests documentation suggests, but it didn't make a difference. I also tried using a .format string instead and still no luck.</p>