SocketTools .NET Edition

HttpClient Methods

The methods of the HttpClient class are listed below. For a complete list of HttpClient class members, see the HttpClient Members topic.

Public Static (Shared) Methods

ErrorText Returns the description of an error code.

Public Instance Methods

AddField Overloaded. Add the form field and its value to the current form.
AddFile Append the contents of the file to the current form.
AddHeaders Add one or more request headers.
AsyncGetFile Overloaded. Download a file from the server to the local system in the background.
AsyncPutFile Overloaded. Upload a file from the local system to the server in the background.
AttachThread Attach an instance of the class to the current thread
Authenticate Overloaded. Authenticate the client session with a username and password.
Cancel Cancel the current blocking client operation.
ClearForm Remove all defined fields from the current form.
ClearHeaders Reset the current request and response headers to their default values.
CloseFile Close the file that was opened on the server.
Command Overloaded. Send a custom command to the web server.
Connect Overloaded. Establish a connection with a remote host.
CreateFile Overloaded. Create a new file or overwrite an existing file on the web server.
CreateForm Overloaded. Create a new virtual form.
DeleteField Delete a form field and its value from the current form.
DeleteFile Remove a file on the web server.
Disconnect Terminate the connection with a remote host.
Dispose Overloaded. Releases all resources used by HttpClient.
Equals (inherited from Object) Determines whether the specified Object is equal to the current Object.
GetCookie Overloaded. Return information about the specified cookie.
GetData Overloaded. Retrieve data from a web server and store it in a byte array.
GetFile Overloaded. Transfer data from the web server and store it in a file on the local system.
GetFileSize Overloaded. Return the size of the specified file on the web server.
GetFileTime Overloaded. Return the modification date and time for specified file on the web server.
GetFileZone Overloaded. Returns the security zone information for a local file.
GetFirstHeader Return the first response header field name and value.
GetHashCode (inherited from Object) Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetHeader Return the value of the specified response header field.
GetNextHeader Return the next response header field name and value.
GetSecurityZone Returns the security zone identifier for the specified resource.
GetText Overloaded. Request content from the web server and store it in a string buffer.
GetType (inherited from Object) Gets the Type of the current instance.
Initialize Overloaded. Initialize an instance of the HttpClient class.
OpenFile Open a file on the web server for reading.
PatchData Overloaded. Submits patch data to the server and returns the result in a string.
PostData Overloaded. Submits the contents of the specified buffer to a resource on the server.
PostFile Overloaded. Submit the contents of a file to a resource on the server using the specified form field name.
PostJson Overloaded. Submit JSON formatted text to the server and returns the response in a string.
PostText Overloaded. Post text data to the server specifying one or more options and returns the response in a string.
PostXml Overloaded. Submit XML formatted text to the server and returns the response in a string.
PutData Overloaded. Send the contents of a byte array to the server and return the response.
PutFile Overloaded. Transfer a file from the local system to the web server.
PutText Overloaded. Submits text in a string buffer to the server using the PUT command.
Read Overloaded. Read data from the server and store it in a byte array.
Reset Reset the internal state of the object, resetting all properties to their default values.
SetCookie Send the specified cookie to the server when a resource is requested.
SetFileZone Overloaded. Creates or changes the security zone information for a local file.
SetHeader Set the value of a request header field.
SubmitForm Overloaded. Submits the current form data to the server for processing.
TaskAbort Overloaded. Abort the specified asynchronous task.
TaskDone Overloaded. Determine if an asynchronous task has completed.
TaskResume Overloaded. Resume execution of an asynchronous task.
TaskSuspend Overloaded. Suspend execution of an asynchronous task.
TaskWait Overloaded. Wait for an asynchronous task to complete.
ToString (inherited from Object) Returns a String that represents the current Object.
Uninitialize Uninitialize the class library and release any resources allocated for the current thread.
ValidateUrl Determines if the specified string represents a valid HTTP URL.
VerifyFile Verify that the contents of a file on the local system are the same as the specified file on the server.
Write Overloaded. Write one or more bytes of data to the server.

Protected Instance Methods

Dispose Overloaded. Releases the unmanaged resources allocated by the HttpClient class and optionally releases the managed resources.
Finalize Destroys an instance of the class, releasing the resources allocated for the session and unloading the networking library.
MemberwiseClone (inherited from Object) Creates a shallow copy of the current Object.

See Also