Set timeout for request function