Implemented functions and tests for response and connection timeout