This event fires after the Http connection has been established and can be useful to set specific WinInet options on the HTTP connection.

Syntax:

o.OnHttpPostConnect(lnHttpHandle)
Parameters: lnHttpHandle
The HTTP Handle created with the WinInet HttpOpenRequest() call. The Internet handle is also available in wwHttp::hHttpSession.
Example:
DEFINE CLASS MywwHttp as wwHTTP

FUNCTION OnHttpPostConnect()

DECLARE INTEGER InternetSetOption ;
   IN WININET.DLL ;
   INTEGER HINTERNET,;
   INTEGER dwFlags,;
   INTEGER @dwValue,;
   INTEGER cbSize

*** Make the Connection Timeout longer
dwTimeoutSecs= 50 * 1000   && to milliseconds
llRetVal=InternetSetOption(lnHandle,;
   INTERNET_OPTION_CONNECT_TIMEOUT,;
   @dwTimeoutSecs,4)

ENDFUNC

ENDDEFINE
Remarks: Only fires on calls to HttpGetEx and HttpGet. Not supported on async calls.

See also:

Class wwHTTP

Updated: 5/27/2005 | Send topic feedback