Click or drag to resize

HttpClient Methods

The HttpClient type exposes the following members.

Methods
 NameDescription
Public methodAbort Closes the currently open connection (if present).
Public methodCode exampleBeginGetRequestStream Begins an asynchronous request for a Stream object to use to write data.
Public methodCode exampleBeginGetResponseStream Begins an asynchronous response for a Stream object to use to read data.
Public methodConnect Connect the client to a remote network host.
(Inherited from Client)
Public methodConnect(String, Int32) Connect to the host address at the specified port.
(Inherited from Client)
Public methodConnectNew Overloaded. Opens and returns new connection with specified host and port.
(Inherited from Client)
Public methodDispatch 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. Uses the TryDispatch method to send data and raises an HttpException exception if any errors occurs.
Public methodDispatchAsync Asynchronously dispatch a request and return a response to the specified callback function
Public methodDispatchAsyncEx Asynchronously dispatch a request and return a response to the specified callback function
Public methodDispatchBytesAsync Asynchronously launches the request that returns a byte array
Public methodDispatchBytesAsyncEx Asynchronously launches the request that returns a byte array
Public methodDispatchStringAsync Asynchronously launches the request that returns a string
Public methodDispatchStringAsyncEx Asynchronously launches the request that returns a string
Public methodDispose Disposes the Client Connection.
(Inherited from Client)
Protected methodDispose(Boolean) Disposes of the current instance and releases all resources used by it.
(Overrides ClientDispose(Boolean))
Public methodCode exampleEndGetRequestStream Supply the stream interface
Public methodCode exampleEndGetResponseStream Ends an asynchronous request to an Internet resource
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Public methodFgetFile Gets the file from the server and writes the data to lpath
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
Public methodFpostFile Posts the file data to the server from the local machine
Public methodFputFile Puts the file data to the server from the local machine
Public methodGet(String) Retrieves an HTTP document (as a string) from the provided URL using the GET HTTP command.
Public methodGet(String, Encoding) Retrieves an HTTP document (as a string) in the specified encoding from the provided URL using the GET HTTP command.
Public methodGetAsync(String, HTTPClientStringCallback) Asynchronously retrieves an HTTP document from the provided URL using the GET HTTP command.
Public methodGetAsync(String, Encoding, HTTPClientStringCallback) Asynchronously retrieves an HTTP document using a callback in the specified encoding from the provided URL using the GET HTTP command.
Public methodGetAsyncEx(String, HTTPClientStringCallbackEx, Object) Asynchronously retrieves an HTTP document from the provided URL using the GET HTTP command.
Public methodGetAsyncEx(String, Encoding, HTTPClientStringCallbackEx, Object) Asynchronously retrieves an HTTP document using a callback in the specified encoding from the provided URL using the GET HTTP command.
Public methodGetBytes Retrieves binary data from the provided URL.
Public methodGetBytesAsync Asynchronously retrieves binary data from the provided URL using a callback.
Public methodGetBytesAsyncEx Asynchronously retrieves binary data from the provided URL using a callback.
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Protected methodGetHttpConnection This method is used internally to acquire (either create or retrieve from the pool) an HTTP connection with the provided parameters.
Public methodGetResponse 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.
Public methodGetResponseAsync Asynchronously creates and sends a GET HTTP request to the server using the callback. A Response is returned.
Public methodGetResponseAsyncEx Asynchronously creates and sends a GET HTTP request to the server using the callback. A Response is returned.
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Protected methodNewConnection Creates a New Client Connection with the specified binding.
(Inherited from Client)
Public methodPost(String, Stream) Retrieves an HTTP document (as a string) from the provided Url using the POST HTTP command.
Public methodPost(String, Byte) Retrieves an HTTP document (as a string) from the provided URL using the POST HTTP command.
Public methodPostAsync(String, Stream, HTTPClientResponseCallback) Asynchronously retrieves an HTTP document (as a string) from the provided Url using the POST HTTP command.
Public methodPostAsync(String, Byte, HTTPClientStringCallback) Asynchronously retrieves an HTTP document (as a string) from the provided Url using the POST HTTP command.
Public methodPostAsync(String, Byte, HTTPClientStringCallbackEx, Object) Asynchronously retrieves an HTTP document (as a string) from the provided Url using the POST HTTP command.
Public methodPostAsyncEx Asynchronously retrieves an HTTP document (as a string) from the provided Url using the POST HTTP command.
Protected methodReleaseConnection Releases the Connection for the specified connection in the Connection Pool.
(Inherited from Client)
Protected methodRequestDone Request is done being processed.
Protected methodResolveHostName Resolves the host name.
(Inherited from Client)
Protected methodResolveHostNameIfNeeded Determines whether it is necessary to resolve the host name based on the Host Address and DNS resolve type, and then resolves the host name accordingly.
(Inherited from Client)
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Protected methodTriggerOnResolvedHostName Trigger the OnResolvedHostName.
(Inherited from Client)
Protected methodTriggerOnResolveHostName Triggers the Resolve
(Inherited from Client)
Top
See Also