Like all network operations, performing the POST request may fail for various
reasons. When no response from the remote end is received, a requests.post()
call may never return, leading to an unbounded increase in the sender queue.
To remedy such situations let's add a timeout argument to the requests call and
make it configurable, to be adaptable for different environments.
For more information see
https://2.python-requests.org/en/master/user/quickstart/#timeouts