HttpClient
Overview
The HttpClient class represents a client connection to an HTTP Server.
For example: The Get method allows to retrieve a remote HTTP page specified via its Url as a String. Binary data, like an image, can be retrieved via the GetBytes method. Many of the HttpClient class properties map to a standard HTTP request header for easy reference.
The HttpClient class uses the HttpClientRequest class to send messages to the server and the HttpClientResponse class to receive the server answer.
This class is used internally by the IpHttpClientChannel to communicate with the server.
Location
- Reference: RemObjects.SDK.dll
- Namespace: RemObjects.SDK.Http
- Ancestry: Component | Client | HttpClient
constructor
Creates a new instanse of the HttpClient class.
constructor
HttpClient()
Sub New()
Abort
Closes the currently open connection (if present).
method Abort
void Abort()
Sub Abort()
Accept
Gets or sets content types that are acceptable for the response. The default value is "text/html, image/gif, image/jpeg, image/png, /".
property Accept: String read write;
String Accept { get; set; }
Property Accept() As String
Bearer
property Bearer: String read write;
String Bearer { get; set; }
Property Bearer() As String
BindingV4 (declared in Client)
Gets the binding which provides properties and methods such as address family, IPv4 address, port number etc for client to connect to the host network.
property BindingV4: Binding read;
Binding BindingV4 { get; }
ReadOnly Property BindingV4() As Binding
BindingV6 (declared in Client)
Gets the binding which provides properties and methods such as address family, IPv6 address, port number etc for client to connect to the host network.
property BindingV6: Binding read;
Binding BindingV6 { get; }
ReadOnly Property BindingV6() As Binding
Connect (declared in Client)
Connect (IPAddress, Int32): Connection (declared in Client)
method Connect(host: IPAddress; port: Int32): Connection
Connection Connect(IPAddress host, Int32 port)
Function Connect(host As IPAddress, port As Int32) As Connection
Parameters:
- host:
- port:
Connect (String, Int32): Connection (declared in Client)
method Connect(hostname: String; port: Int32): Connection
Connection Connect(String hostname, Int32 port)
Function Connect(hostname As String, port As Int32) As Connection
Parameters:
- hostname:
- port:
Connect (IPAddress, Int32, Binding): Connection (declared in Client)
Overloaded. Use to connect the client to a remote network host using the specified host name (HostName) or IP address (HostAddress) and port number (Port) and/or Binding (BindingV4 or BindingV6).
class method Connect(host: IPAddress; port: Int32; binding: Binding): Connection
static Connection Connect(IPAddress host, Int32 port, Binding binding)
Shared Function Connect(host As IPAddress, port As Int32, binding As Binding) As Connection
Parameters:
- host:
- port:
- binding:
Connect (String, Int32, Binding): Connection (declared in Client)
Overloaded. Use to connect the client to a remote network host using the specified host name (HostName) or IP address (HostAddress) and port number (Port) and/or Binding (BindingV4 or BindingV6).
class method Connect(hostname: String; port: Int32; binding: Binding): Connection
static Connection Connect(String hostname, Int32 port, Binding binding)
Shared Function Connect(hostname As String, port As Int32, binding As Binding) As Connection
Parameters:
- hostname:
- port:
- binding:
ConnectionClass (declared in Client)
Use the ConnectionClass property to specify an alternative Connection class to be used for out coming data connections. The class described by the assigned Type must be a descendant of Connection, and will be used for all connections that are established after the property has been set. Existing connections are not affected by changing the property.
If ConnectionType is null (default), instances of the Connection base class will be used.
property ConnectionClass: Type read write;
Type ConnectionClass { get; set; }
Property ConnectionClass() As Type
ConnectionFactory (declared in Client)
Represents an interface for a connection.
property ConnectionFactory: IConnectionFactory read write;
IConnectionFactory ConnectionFactory { get; set; }
Property ConnectionFactory() As IConnectionFactory
ConnectionPool protected (declared in Client)
property ConnectionPool: ConnectionPool read write;
ConnectionPool ConnectionPool { get; set; }
Property ConnectionPool() As ConnectionPool
ConnectNew (IPAddress, Int32): Connection (declared in Client)
Overloaded. Opens and returns new connection with specified IP address and port.
method ConnectNew(host: IPAddress; port: Int32): Connection
Connection ConnectNew(IPAddress host, Int32 port)
Function ConnectNew(host As IPAddress, port As Int32) As Connection
Parameters:
- host:
- port:
ConnectNew (String, Int32): Connection (declared in Client)
method ConnectNew(hostname: String; port: Int32): Connection
Connection ConnectNew(String hostname, Int32 port)
Function ConnectNew(hostname As String, port As Int32) As Connection
Parameters:
- hostname:
- port:
Dispatch
One of the core methods of the HttpClient class. This method uses the HttpClientRequest class to send messages to the server and the HttpClientResponse to receive server answers.
This method uses the TryDispatch method to send data and raises an HttpException exception if any errors occurs.
method Dispatch(request: HttpClientRequest): HttpClientResponse
HttpClientResponse Dispatch(HttpClientRequest request)
Function Dispatch(request As HttpClientRequest) As HttpClientResponse
Parameters:
- request:
DnsResolveType (declared in Client)
Determines if the specified HostName should be look up only Once per application run (if you establish multiple connections to the server, the subsequent connections will use the cached IPAddress) or Always, for each connect (the Hostname will be resolved again for each subsequet connect).
You'll usually only change this setting off the defaut (Once) if you anticipate the IPAddress of the target host to change frequently.
property DnsResolveType: DnsResolveType read write;
DnsResolveType DnsResolveType { get; set; }
Property DnsResolveType() As DnsResolveType
EnableNagle (declared in Client)
Set its value to true to enable the Nagle algorithm for send coalescing.
property EnableNagle: Boolean read write;
Boolean EnableNagle { get; set; }
Property EnableNagle() As Boolean
Get (String): String
Retrieves an HTTP document (as a string) from the provided URL using the GET HTTP command.
method Get(url: String): String
String Get(String url)
Function Get(url As String) As String
Parameters:
- url:
Get (String, Encoding): String
Retrieves an HTTP document (as a string) in the specified encoding from the provided URL using the GET HTTP command.
method Get(url: String; encoding: Encoding): String
String Get(String url, Encoding encoding)
Function Get(url As String, encoding As Encoding) As String
Parameters:
- url:
- encoding:
GetBytes
Retrieves binary data from the provided URL.
method GetBytes(url: String): array of Byte
Byte[] GetBytes(String url)
Function GetBytes(url As String) As Byte()
Parameters:
- url:
GetConnection protected
method GetConnection(host: IPAddress; port: Int32): Connection
Connection GetConnection(IPAddress host, Int32 port)
Function GetConnection(host As IPAddress, port As Int32) As Connection
Parameters:
- host:
- port:
GetDefaultConnectionPool protected (declared in Client)
method GetDefaultConnectionPool: ConnectionPool
ConnectionPool GetDefaultConnectionPool()
Function GetDefaultConnectionPool() As ConnectionPool
GetResponse
This method is used internally by all other Get* methods of this class. It creates and sends a GET HTTP request to the server and returns a response.
method GetResponse(url: String): HttpClientResponse
HttpClientResponse GetResponse(String url)
Function GetResponse(url As String) As HttpClientResponse
Parameters:
- url:
HostAddress (declared in Client)
Gets or sets an Internet Protocol (IP) address.
property HostAddress: IPAddress read write;
IPAddress HostAddress { get; set; }
Property HostAddress() As IPAddress
HostName (declared in Client)
The server host name or IP address that you intend the client to connect to.
property HostName: String read write;
String HostName { get; set; }
Property HostName() As String
KeepAlive
Controls whether to use HTTP Keep-Alive to keep the connection alive between requests.
If enabled (true), once a request is made and a connection is established, this connection is kept open and used for future requests.
If disabled, the connection is closed, and a new connection is created for future requests.
Since establishing a connection is - relatively speaking - a costly and resource intensive operation for the network, compared to sending small amounts of data, it is recommended to keep this option enabled for optimal performance, if requests to the server are done relatively frequently.
For Keep-Alive to work, the option must be supported and enabled on both client and server.
property KeepAlive: Boolean read write;
Boolean KeepAlive { get; set; }
Property KeepAlive() As Boolean
NewConnection protected
method NewConnection(binding: Binding): Connection
Connection NewConnection(Binding binding)
Function NewConnection(binding As Binding) As Connection
Parameters:
- binding:
OnResolvedHostName (declared in Client)
This event is fired after the hostname has been successfully resolved.
event OnResolvedHostName: EventHandler<ResolvedHostNameEventArgs>;
delegate EventHandler<ResolvedHostNameEventArgs> OnResolvedHostName()
Event OnResolvedHostName As EventHandler<ResolvedHostNameEventArgs>
OnResolveHostName (declared in Client)
This event is fired before the Client attepts to resolve the sepcifed HostName to an IP address. It provides you with an option to perform the resolution yourself, obtain the IP address from an internal cache you're maintaing, or do some other processing (such as for example chaging the hostname to look up).
event OnResolveHostName: EventHandler<ResolveHostNameEventArgs>;
delegate EventHandler<ResolveHostNameEventArgs> OnResolveHostName()
Event OnResolveHostName As EventHandler<ResolveHostNameEventArgs>
Password
Password that will be inserted into the Authorization HTTP header in the request to the server.
property Password: String read write;
String Password { get; set; }
Property Password() As String
Port (declared in Client)
The server Port that you intend the client to connect to.
property Port: Int32 read write;
Int32 Port { get; set; }
Property Port() As Int32
Post (String, array of Byte): String
Retrieves an HTTP document (as a string) from the provided URL using the POST HTTP command.
method Post(url: String; content: array of Byte): String
String Post(String url, Byte[] content)
Function Post(url As String, content As Byte()) As String
Parameters:
- url:
- content:
Post (String, Stream): String
Retrieves an HTTP document (as a string) from the provided Url using the POST HTTP command.
method Post(url: String; content: Stream): String
String Post(String url, Stream content)
Function Post(url As String, content As Stream) As String
Parameters:
- url:
- content:
ProxySettings
property ProxySettings: HttpProxySettings read;
HttpProxySettings ProxySettings { get; }
ReadOnly Property ProxySettings() As HttpProxySettings
ReleaseConnection protected (declared in Client)
method ReleaseConnection(connection: Connection)
void ReleaseConnection(Connection connection)
Sub ReleaseConnection(connection As Connection)
Parameters:
- connection:
ResolveHostName protected (declared in Client)
method ResolveHostName
void ResolveHostName()
Sub ResolveHostName()
ResolveHostNameIfNeeded protected (declared in Client)
method ResolveHostNameIfNeeded
void ResolveHostNameIfNeeded()
Sub ResolveHostNameIfNeeded()
SslOptions (declared in Client)
property SslOptions: SslConnectionFactory read write;
SslConnectionFactory SslOptions { get; set; }
Property SslOptions() As SslConnectionFactory
Timeout
Gets or sets the maximum amount of time (in seconds) that a client will wait for a server response within a single request. The default value is 60 seconds (1 minute).
The timeout handling can be activated via the TimeoutEnabled property.
property Timeout: Int32 read write;
Int32 Timeout { get; set; }
Property Timeout() As Int32
TimeoutEnabled
This property controls whether the request operation will do an automatic timeout checking. If timeout handling is turned on (i.e. this property is set to true) and a request takes longer than Timeout, it will be terminated.
property TimeoutEnabled: Boolean read write;
Boolean TimeoutEnabled { get; set; }
Property TimeoutEnabled() As Boolean
TriggerOnResolvedHostName protected (declared in Client)
method TriggerOnResolvedHostName(e: ResolvedHostNameEventArgs)
void TriggerOnResolvedHostName(ResolvedHostNameEventArgs e)
Sub TriggerOnResolvedHostName(e As ResolvedHostNameEventArgs)
Parameters:
- e:
TriggerOnResolveHostName protected (declared in Client)
method TriggerOnResolveHostName(e: ResolveHostNameEventArgs)
void TriggerOnResolveHostName(ResolveHostNameEventArgs e)
Sub TriggerOnResolveHostName(e As ResolveHostNameEventArgs)
Parameters:
- e:
TryDispatch
The core method of the HttpClient class. This method uses the HttpClientRequest class to send messages to the server and the HttpClientResponse to receive a server answer.
method TryDispatch(request: HttpClientRequest): HttpClientResponse
HttpClientResponse TryDispatch(HttpClientRequest request)
Function TryDispatch(request As HttpClientRequest) As HttpClientResponse
Parameters:
- request:
UseConnectionPooling
Enables or disables connection pooling.
property UseConnectionPooling: Boolean read write;
Boolean UseConnectionPooling { get; set; }
Property UseConnectionPooling() As Boolean
UserAgent
Gets or sets the identifier of the software being used to retrieve data via the URL. Some custom HTTP servers check this HTTP header to provide content optimized for particular HTTP browsers (like Internet Explorer or Chrome).
The default value is RemObjects Remoting SDK HTTP Client.
property UserAgent: String read write;
String UserAgent { get; set; }
Property UserAgent() As String
UserName
Name that will be inserted into the Authorization HTTP header in the request to the server.
property UserName: String read write;
String UserName { get; set; }
Property UserName() As String
Version
Gets or sets the version identifier of the UserAgent. Can be used to mimic particular browsers like Internet Explorer 6.0
property Version: String read write;
String Version { get; set; }
Property Version() As String
Accept
Gets or sets content types that are acceptable for the response. The default value is "text/html, image/gif, image/jpeg, image/png, /".
property Accept: String read write;
String Accept { get; set; }
Property Accept() As String
Bearer
property Bearer: String read write;
String Bearer { get; set; }
Property Bearer() As String
BindingV4 (declared in Client)
Gets the binding which provides properties and methods such as address family, IPv4 address, port number etc for client to connect to the host network.
property BindingV4: Binding read;
Binding BindingV4 { get; }
ReadOnly Property BindingV4() As Binding
BindingV6 (declared in Client)
Gets the binding which provides properties and methods such as address family, IPv6 address, port number etc for client to connect to the host network.
property BindingV6: Binding read;
Binding BindingV6 { get; }
ReadOnly Property BindingV6() As Binding
ConnectionClass (declared in Client)
Use the ConnectionClass property to specify an alternative Connection class to be used for out coming data connections. The class described by the assigned Type must be a descendant of Connection, and will be used for all connections that are established after the property has been set. Existing connections are not affected by changing the property.
If ConnectionType is null (default), instances of the Connection base class will be used.
property ConnectionClass: Type read write;
Type ConnectionClass { get; set; }
Property ConnectionClass() As Type
ConnectionFactory (declared in Client)
Represents an interface for a connection.
property ConnectionFactory: IConnectionFactory read write;
IConnectionFactory ConnectionFactory { get; set; }
Property ConnectionFactory() As IConnectionFactory
ConnectionPool protected (declared in Client)
property ConnectionPool: ConnectionPool read write;
ConnectionPool ConnectionPool { get; set; }
Property ConnectionPool() As ConnectionPool
DnsResolveType (declared in Client)
Determines if the specified HostName should be look up only Once per application run (if you establish multiple connections to the server, the subsequent connections will use the cached IPAddress) or Always, for each connect (the Hostname will be resolved again for each subsequet connect).
You'll usually only change this setting off the defaut (Once) if you anticipate the IPAddress of the target host to change frequently.
property DnsResolveType: DnsResolveType read write;
DnsResolveType DnsResolveType { get; set; }
Property DnsResolveType() As DnsResolveType
EnableNagle (declared in Client)
Set its value to true to enable the Nagle algorithm for send coalescing.
property EnableNagle: Boolean read write;
Boolean EnableNagle { get; set; }
Property EnableNagle() As Boolean
HostAddress (declared in Client)
Gets or sets an Internet Protocol (IP) address.
property HostAddress: IPAddress read write;
IPAddress HostAddress { get; set; }
Property HostAddress() As IPAddress
HostName (declared in Client)
The server host name or IP address that you intend the client to connect to.
property HostName: String read write;
String HostName { get; set; }
Property HostName() As String
KeepAlive
Controls whether to use HTTP Keep-Alive to keep the connection alive between requests.
If enabled (true), once a request is made and a connection is established, this connection is kept open and used for future requests.
If disabled, the connection is closed, and a new connection is created for future requests.
Since establishing a connection is - relatively speaking - a costly and resource intensive operation for the network, compared to sending small amounts of data, it is recommended to keep this option enabled for optimal performance, if requests to the server are done relatively frequently.
For Keep-Alive to work, the option must be supported and enabled on both client and server.
property KeepAlive: Boolean read write;
Boolean KeepAlive { get; set; }
Property KeepAlive() As Boolean
Password
Password that will be inserted into the Authorization HTTP header in the request to the server.
property Password: String read write;
String Password { get; set; }
Property Password() As String
Port (declared in Client)
The server Port that you intend the client to connect to.
property Port: Int32 read write;
Int32 Port { get; set; }
Property Port() As Int32
ProxySettings
property ProxySettings: HttpProxySettings read;
HttpProxySettings ProxySettings { get; }
ReadOnly Property ProxySettings() As HttpProxySettings
SslOptions (declared in Client)
property SslOptions: SslConnectionFactory read write;
SslConnectionFactory SslOptions { get; set; }
Property SslOptions() As SslConnectionFactory
Timeout
Gets or sets the maximum amount of time (in seconds) that a client will wait for a server response within a single request. The default value is 60 seconds (1 minute).
The timeout handling can be activated via the TimeoutEnabled property.
property Timeout: Int32 read write;
Int32 Timeout { get; set; }
Property Timeout() As Int32
TimeoutEnabled
This property controls whether the request operation will do an automatic timeout checking. If timeout handling is turned on (i.e. this property is set to true) and a request takes longer than Timeout, it will be terminated.
property TimeoutEnabled: Boolean read write;
Boolean TimeoutEnabled { get; set; }
Property TimeoutEnabled() As Boolean
UseConnectionPooling
Enables or disables connection pooling.
property UseConnectionPooling: Boolean read write;
Boolean UseConnectionPooling { get; set; }
Property UseConnectionPooling() As Boolean
UserAgent
Gets or sets the identifier of the software being used to retrieve data via the URL. Some custom HTTP servers check this HTTP header to provide content optimized for particular HTTP browsers (like Internet Explorer or Chrome).
The default value is RemObjects Remoting SDK HTTP Client.
property UserAgent: String read write;
String UserAgent { get; set; }
Property UserAgent() As String
UserName
Name that will be inserted into the Authorization HTTP header in the request to the server.
property UserName: String read write;
String UserName { get; set; }
Property UserName() As String
Version
Gets or sets the version identifier of the UserAgent. Can be used to mimic particular browsers like Internet Explorer 6.0
property Version: String read write;
String Version { get; set; }
Property Version() As String
Connect (IPAddress, Int32, Binding): Connection (declared in Client)
Overloaded. Use to connect the client to a remote network host using the specified host name (HostName) or IP address (HostAddress) and port number (Port) and/or Binding (BindingV4 or BindingV6).
class method Connect(host: IPAddress; port: Int32; binding: Binding): Connection
static Connection Connect(IPAddress host, Int32 port, Binding binding)
Shared Function Connect(host As IPAddress, port As Int32, binding As Binding) As Connection
Parameters:
- host:
- port:
- binding:
Connect (String, Int32, Binding): Connection (declared in Client)
Overloaded. Use to connect the client to a remote network host using the specified host name (HostName) or IP address (HostAddress) and port number (Port) and/or Binding (BindingV4 or BindingV6).
class method Connect(hostname: String; port: Int32; binding: Binding): Connection
static Connection Connect(String hostname, Int32 port, Binding binding)
Shared Function Connect(hostname As String, port As Int32, binding As Binding) As Connection
Parameters:
- hostname:
- port:
- binding:
constructor
Creates a new instanse of the HttpClient class.
constructor
HttpClient()
Sub New()
Abort
Closes the currently open connection (if present).
method Abort
void Abort()
Sub Abort()
Connect (declared in Client)
Connect (IPAddress, Int32): Connection (declared in Client)
method Connect(host: IPAddress; port: Int32): Connection
Connection Connect(IPAddress host, Int32 port)
Function Connect(host As IPAddress, port As Int32) As Connection
Parameters:
- host:
- port:
Connect (String, Int32): Connection (declared in Client)
method Connect(hostname: String; port: Int32): Connection
Connection Connect(String hostname, Int32 port)
Function Connect(hostname As String, port As Int32) As Connection
Parameters:
- hostname:
- port:
ConnectNew (IPAddress, Int32): Connection (declared in Client)
Overloaded. Opens and returns new connection with specified IP address and port.
method ConnectNew(host: IPAddress; port: Int32): Connection
Connection ConnectNew(IPAddress host, Int32 port)
Function ConnectNew(host As IPAddress, port As Int32) As Connection
Parameters:
- host:
- port:
ConnectNew (String, Int32): Connection (declared in Client)
method ConnectNew(hostname: String; port: Int32): Connection
Connection ConnectNew(String hostname, Int32 port)
Function ConnectNew(hostname As String, port As Int32) As Connection
Parameters:
- hostname:
- port:
Dispatch
One of the core methods of the HttpClient class. This method uses the HttpClientRequest class to send messages to the server and the HttpClientResponse to receive server answers.
This method uses the TryDispatch method to send data and raises an HttpException exception if any errors occurs.
method Dispatch(request: HttpClientRequest): HttpClientResponse
HttpClientResponse Dispatch(HttpClientRequest request)
Function Dispatch(request As HttpClientRequest) As HttpClientResponse
Parameters:
- request:
Get (String): String
Retrieves an HTTP document (as a string) from the provided URL using the GET HTTP command.
method Get(url: String): String
String Get(String url)
Function Get(url As String) As String
Parameters:
- url:
Get (String, Encoding): String
Retrieves an HTTP document (as a string) in the specified encoding from the provided URL using the GET HTTP command.
method Get(url: String; encoding: Encoding): String
String Get(String url, Encoding encoding)
Function Get(url As String, encoding As Encoding) As String
Parameters:
- url:
- encoding:
GetBytes
Retrieves binary data from the provided URL.
method GetBytes(url: String): array of Byte
Byte[] GetBytes(String url)
Function GetBytes(url As String) As Byte()
Parameters:
- url:
GetConnection protected
method GetConnection(host: IPAddress; port: Int32): Connection
Connection GetConnection(IPAddress host, Int32 port)
Function GetConnection(host As IPAddress, port As Int32) As Connection
Parameters:
- host:
- port:
GetDefaultConnectionPool protected (declared in Client)
method GetDefaultConnectionPool: ConnectionPool
ConnectionPool GetDefaultConnectionPool()
Function GetDefaultConnectionPool() As ConnectionPool
GetResponse
This method is used internally by all other Get* methods of this class. It creates and sends a GET HTTP request to the server and returns a response.
method GetResponse(url: String): HttpClientResponse
HttpClientResponse GetResponse(String url)
Function GetResponse(url As String) As HttpClientResponse
Parameters:
- url:
NewConnection protected
method NewConnection(binding: Binding): Connection
Connection NewConnection(Binding binding)
Function NewConnection(binding As Binding) As Connection
Parameters:
- binding:
Post (String, array of Byte): String
Retrieves an HTTP document (as a string) from the provided URL using the POST HTTP command.
method Post(url: String; content: array of Byte): String
String Post(String url, Byte[] content)
Function Post(url As String, content As Byte()) As String
Parameters:
- url:
- content:
Post (String, Stream): String
Retrieves an HTTP document (as a string) from the provided Url using the POST HTTP command.
method Post(url: String; content: Stream): String
String Post(String url, Stream content)
Function Post(url As String, content As Stream) As String
Parameters:
- url:
- content:
ReleaseConnection protected (declared in Client)
method ReleaseConnection(connection: Connection)
void ReleaseConnection(Connection connection)
Sub ReleaseConnection(connection As Connection)
Parameters:
- connection:
ResolveHostName protected (declared in Client)
method ResolveHostName
void ResolveHostName()
Sub ResolveHostName()
ResolveHostNameIfNeeded protected (declared in Client)
method ResolveHostNameIfNeeded
void ResolveHostNameIfNeeded()
Sub ResolveHostNameIfNeeded()
TriggerOnResolvedHostName protected (declared in Client)
method TriggerOnResolvedHostName(e: ResolvedHostNameEventArgs)
void TriggerOnResolvedHostName(ResolvedHostNameEventArgs e)
Sub TriggerOnResolvedHostName(e As ResolvedHostNameEventArgs)
Parameters:
- e:
TriggerOnResolveHostName protected (declared in Client)
method TriggerOnResolveHostName(e: ResolveHostNameEventArgs)
void TriggerOnResolveHostName(ResolveHostNameEventArgs e)
Sub TriggerOnResolveHostName(e As ResolveHostNameEventArgs)
Parameters:
- e:
TryDispatch
The core method of the HttpClient class. This method uses the HttpClientRequest class to send messages to the server and the HttpClientResponse to receive a server answer.
method TryDispatch(request: HttpClientRequest): HttpClientResponse
HttpClientResponse TryDispatch(HttpClientRequest request)
Function TryDispatch(request As HttpClientRequest) As HttpClientResponse
Parameters:
- request:
OnResolvedHostName (declared in Client)
This event is fired after the hostname has been successfully resolved.
event OnResolvedHostName: EventHandler<ResolvedHostNameEventArgs>;
delegate EventHandler<ResolvedHostNameEventArgs> OnResolvedHostName()
Event OnResolvedHostName As EventHandler<ResolvedHostNameEventArgs>
OnResolveHostName (declared in Client)
This event is fired before the Client attepts to resolve the sepcifed HostName to an IP address. It provides you with an option to perform the resolution yourself, obtain the IP address from an internal cache you're maintaing, or do some other processing (such as for example chaging the hostname to look up).
event OnResolveHostName: EventHandler<ResolveHostNameEventArgs>;
delegate EventHandler<ResolveHostNameEventArgs> OnResolveHostName()
Event OnResolveHostName As EventHandler<ResolveHostNameEventArgs>