Back to product page
- Introduction
- License agreement
- Getting Started
- Objects
- Enumerations
- wodHttpDLX
- Methods
- Properties
- Authentication
- AutoRedirect
- BindIP
- Blocking
- CertErrors
- Certificate
- Compression
- Hostname
- HTTPversion
- IgnoreCertErrors
- KeepAlive
- LastError
- LastErrorText
- LocalCertBag
- Login
- MyHostname
- MyIP
- Notification
- Password
- Port
- ProxyAuthentication
- ProxyHostname
- ProxyLogin
- ProxyPassword
- ProxyPort
- ProxyType
- Request
- Response
- Secure
- Socket
- SSLCipherList
- State
- Timeout
- URL
- UseIPv6
- Version
- Events
- wodHttpNotify
- HttpCookie
- HttpCookies
- HttpHeader
- HttpHeaders
- HttpRequest
- HttpRequestFormPost
- HttpRequestFormUpload
- HttpResponse
- How to get support?
- Technical information
- Fast notifications interface
- Error list
Connect method
Connects to remote server.
Type
NoneSyntax
- Basic
object.Connect [Host], [Port]
The Connect(object,Host,Port) syntax has these parts:
The Connect(object,Host,Port) syntax has these parts:
object | An expression evaluating to an object of type wodHttpDLX. |
Host | Optional. A Variant value. Specifies name or IP address of the server. |
Port | Optional. A Variant value. Specifies port on the server. |
Remarks
Before executing the Connect method, you must first set the Hostname property, or provide hostname information to Host argument. The following sample will manually connect to WeOnlyDo's WEB server (code in VB):wodHttp1.Blocking = True
wodHttp1.Hostname = "http://www.weonlydo.com"
wodHttp1.Port = 80
wodHttp1.Connect
If wodHttp1.LastError <> 0 Then
MsgBox "Unsuccessful - Error:" & wodHttp1.LastError
End If
Please note that if a proxy is used to connect to a server and the connection fails for some reason, the possible cause is a rejected request by the proxy, or other proxy failures. There is no need to explicitly call Connect method, since Get, Post, Put and other methods will do this for you. NOTE: If host cannot be found (invalid hostname specified), or wodHttpDLX fails to connect to it, Disconnected event will be fired - Done will NOT be fired since actual HTTP protocol was not yet performed.