I want to test whether my curl command really return "Connection Timeout" status or not. Therefore I want to try to run curl --connect-timeout 1 connect to any website that need more than 1 second to response in order for curl to timed out. But after trying to numerous website, I still couldn't get connect timeout status (because they responded so fast?). How do you suggest me to be able to accomplish this?
It's ok, I've searched through the stack overflow and find that you can use non routable IP address to simulate this.
E.g. ping 10.255.255.1 or ping 127.255.255.1 or ping 192.168.255.1 all will return request timed out response.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With