I am using Python requests to communicate with an external API. When I do something like: with requests.Session() as sess: resp1 = sess.put( api_url + f"stuff/{id}/endpoint1", json=contents1, ) resp2 = sess.put( api_url + f"things/{id}/endpoint2", json=contents2, ) Can I be sure that the put request to 'endpoint1' gets sent before the put request to 'endpoint2'? Does requests perhaps handle this asynchronously in some way that might make the request to 'endpoint2' to depart before the one to 'endpoint1'? If if cannot be sure, what is then a good approach to ensure that the requests get sent in the order I write them in the code? Background: I use a session in order to re-use some session headers across requests. Continue reading...