using requests library of Python, is there any possibility to get the exact timestamp of received and sent data, e.g. headers or payload data?
Example:
import requests
url = 'http://mytest.url'
headers = {'User-Agent': 'My Agent'}
payload = 'Hello World'
response = requests.post(url, payload, headers)
print response
Output (Note that headers and payload data may have different timestamps of reception!):
2019/10/09 13:00.05.12345 >> POST http://mytest.url HTTP/1.1
2019/10/09 13:00.05.67890 >> User-Agent: My Agent
2019/10/09 13:00.06.12345 >> Hello World
2019/10/09 13:00.10.12345 << HTTP/1.1 200 OK
2019/10/09 13:00.11.12345 << Connection: Keep Alive
2019/10/09 13:00.12.12345 << Hello My Agent
Greets, Steve