This article is a mirror article of machine translation, please click here to jump to the original article.

View: 20896|Reply: 2

[Source] RestSharp a. NET(C#) HTTP helper class component

[Copy link]
Posted on 10/20/2017 10:38:09 PM | | |
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:





Previous:.net/c# Task class with async/await
Next:C# calls Java code (JAR converts to DLL)
 Landlord| Posted on 3/11/2018 9:53:45 PM |
For .net version 4.0, please install Install-Package RestSharp -Version 105.2.3
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com