On the Internet, about . There are still many HTTP-related auxiliary classes in NET(C#), and here I recommend another one for you. .NET HTTP helper class, it is called RestSharp. RestSharp is a lightweight component that does not rely on any third-party components or libraries for Http. RestSharp has the following benefits:
1: Support. NET 3.5+, Silverlight 4, Windows Phone 7, Mono, MonoTouch, Mono for Android, Compact Framework 3.5, etc 2: Easily ingest into any project via NuGet (Install-Package restsharp) 3: XML and JSON can be deserialized automatically 4: Support custom serialization and deserialization 5: Automatically detect the type of content returned 6: Support HTTP GET, POST, PUT, HEAD, OPTIONS, DELETE and other operations 7: Multiple files can be uploaded 8: Support oAuth 1, oAuth 2, Basic, NTLM and Parameter-based Authenticators, etc 9: Support asynchronous operation 10: Extremely easy to use and apply to any project
The above are the main features of RestSharp, which you can easily use to process a series of network requests (GET, POST, PUT, HEAD, OPTIONS, DELETE) and get the return result. Finally, the official application example is as simple as this:
|