I have multiple instances of Chrome and Firefox browsers on my machine. I would like to be able to separate the call based on browser instance.
For example 0 if I open Chrome version 81 and run my test case and Chrome version 81 and run my test case, if Charles is listening, I would need to know which calls went from version 81 and which went from 82.
You can do this by looking at the user-agent
HTTP header, which will be included in every request from a browser. The Chrome 81 user agent for example might look like this:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36
Note the Chrome/81
.
The specific format can vary significantly, and includes a lot of cruft near the start, mainly for backward compatibility reasons. It's generally a bad idea to try to automatically analyse this, but it should be enough for manual inspection.
Take a look at https://developers.whatismybrowser.com/useragents/explore/software_type_specific/web-browser/ for some examples.