Soap Delphi Client end with a timeout for a 1MB call – Stack Overflow
Posted by jpluimers on 2019/09/26
This was a change between IE6 and IE7 on the default time-out decreasing from 3600 seconds to 30 seconds: [WayBack] Soap Delphi Client end with a timeout for a 1MB call – Stack Overflow.
If you want to increase the timeout, then use InternetSetOption. You can get the current value using InternetQueryOption.
In Delphi, THTTPReqResp.Send supports this by setting the various time out options right after creating the request:
Request := HttpOpenRequest(FInetConnect, 'POST', PChar(FURLSite), nil,
nil, nil, Flags, 0{Integer(Self)});
Check(not Assigned(Request));
{ Timeouts }
if FConnectTimeout > 0 then
Check(not InternetSetOption(Request, INTERNET_OPTION_CONNECT_TIMEOUT, Pointer(@FConnectTimeout), SizeOf(FConnectTimeout)));
if FSendTimeout > 0 then
Check(not InternetSetOption(Request, INTERNET_OPTION_SEND_TIMEOUT, Pointer(@FSendTimeout), SizeOf(FSendTimeout)));
if FReceiveTimeout > 0 then
Check(not InternetSetOption(Request, INTERNET_OPTION_RECEIVE_TIMEOUT, Pointer(@FReceiveTimeout), SizeOf(FReceiveTimeout)));
Related:
- [WayBack] THTTPReqResp.Send Method
- [WayBack] THTTPReqResp.ConnectTimeout Property
- [WayBack] THTTPReqResp.ReceiveTimeout Property
- [WayBack] THTTPReqResp.SendTimeout Property
- [WayBack] THTTPReqResp Members
- [WayBack] THTTPReqResp Class
- [WayBack] Option Flags | Microsoft Docs documents all flags, including
INTERNET_OPTION_CONNECT_TIMEOUT,INTERNET_OPTION_SEND_TIMEOUT,INTERNET_OPTION_RECEIVE_TIMEOUT.
–jeroen






Leave a comment