Timeout for HTTPSendRequest
I am calling HttpSendRequest() to get response header from a url. But HttpSendRequest takes more than 2 seconds to return. Why is this so? Is there anyway I can set a timeout for this? I tried SetInternetOption() using INTERNET_OPTION_RECEIVE_TIMEOUT after calling HttpOpenRequest() but that did not work. Thanks in advance..
Re: Timeout for HTTPSendRequest
Try calling InternetSetOption before calling HttpSendRequest.
Re: Timeout for HTTPSendRequest
You should set:
INTERNET_OPTION_RECEIVE_TIMEOUT
INTERNET_OPTION_SEND_TIMEOUT
INTERNET_OPTION_CONNECT_TIMEOUT
If you set all three to 2 seconds, then the entire operation could take up to 6 seconds.
gg