These documents provide a brief introduction to using the methods provided by HttpClient. The information here does not cover all the possible options, but covers enough of the basics to get you up and running. For more information on the available options, refer to the API Reference.
The examples on the following pages are not complete and are only used to highlight the important features that are unique to each method. For complete examples, please refer to the sample code.
Document | Description |
---|---|
Options | The OPTIONS method represents a request for information about the communication options available. |
Get | The GET method means retrieve whatever information is identified by the requested URL. Also refer to the tutorial. |
Head | The HEAD method is identical to GET except that the server must not return a message-body in the response. This method can be used for obtaining metainformation about the document implied by the request without transferring the document itself. |
Post | The POST method is used to request that the origin server accept the data enclosed in the request as a new child of the request URL. POST is designed to allow a uniform method to cover a variety of functions such as appending to a database, providing data to a data-handling process or posting to a message board. |
The multipart post method is identical to the POST method, except that the request body is separated into multiple parts. This method is generally used when uploading files to the server. | |
Put | The PUT method requests that the enclosed document be stored under the supplied URL. This method is generally disabled on publicly available servers because it is generally undesireable to allow clients to put new files on the server or to replace existing files. |
Delete | The DELETE method requests that the server delete the resource identified by the request URL. This method is generally disabled on publicly available servers because it is generally undesireable to allow clients to delete files on the server. |
Trace | The TRACE method is used to invoke a remote, application-layer loop-back of the request message. This allows the client to see what is being received at the other end of the request chain and use that data for testing or diagnostic information. |