1
1
# RestSharp - Simple .NET REST Client
2
2
3
- RestSharp is a lightweight HTTP client library. It's a wrapper around ` HttpClient ` , not a full-fledged client on its own.
3
+ ![ ] ( https://img.shields.io/nuget/dt/RestSharp ) [ ![ ] ( https://img.shields.io/nuget/v/RestSharp )] ( https://www.nuget.org/packages/RestSharp ) [ ![ ] ( https://img.shields.io/nuget/vpre/RestSharp )] ( https://www.nuget.org/packages/RestSharp#versions-body-tab )
4
+
5
+ RestSharp is a lightweight HTTP API client library. It's a wrapper around ` HttpClient ` , not a full-fledged client on
6
+ its own.
4
7
5
8
What RestSharp adds to ` HttpClient ` :
6
9
- Default parameters of any kind, not just headers
7
10
- Add a parameter of any kind to requests, like query, URL segment, header, cookie, or body
8
- - Multiple ways to add a request body, including JSON, XML, and form data
9
- - Built-in serialization and deserilization of JSON and XML
10
-
11
- ** RestSharp is supported by [ AWS] ( https://aws.amazon.com/developer/language/net/solutions/ ) .**
12
-
13
- [ ![ AWS Logo] ( https://restsharp.dev/aws_logo.png )] ( https://aws.amazon.com )
11
+ - Multiple ways to add a request body, including JSON, XML, URL-encoded form data, multipart form data with and
12
+ without files
13
+ - Built-in serialization and deserilization of JSON, XML, and CSV, as well as the ability to add custom serializers
14
+ - Rich support for authentication
14
15
15
- ## RestSharp vNext (v107+)
16
+ ## Compatibility note
16
17
17
- Finally, RestSharp has moved to ` HttpClient ` . We also deprecated the following:
18
+ RestSharp 107 was a major release that brings a lot of changes. We've removed a lot of legacy code and added new
19
+ features. Finally, RestSharp has moved to ` HttpClient ` . We also deprecated the following:
18
20
- SimpleJson in favour of ` System.Text.Json.JsonSerialzer `
19
21
- ` IRestRequest ` , and ` IRestResponse ` in favour of implementing classes
20
22
- Everything ` Http ` and ` IHttp ` as those are just wrappers
23
+ - Client configuration moved to ` RestClientOptions ` to make the client thread-safe
24
+ - ` IRestClient ` interface surface substantially reduced
21
25
22
26
Most of the client and some of the request options are now in ` RestClientOptions ` .
23
27
24
28
Check [ v107+ docs] ( https://restsharp.dev/v107 ) for more information.
25
29
26
30
## Packages
27
31
28
- | | |
29
- | -| -|
30
- | downloads | ![ ] ( https://img.shields.io/nuget/dt/RestSharp ) |
31
- | stable | [ ![ ] ( https://img.shields.io/nuget/v/RestSharp )] ( https://www.nuget.org/packages/RestSharp ) |
32
- | preview | ![ ] ( https://img.shields.io/nuget/vpre/RestSharp ) |
32
+ | Package | What it's for |
33
+ | ----------------------------------------| --------------------------------------------------------------------------------------|
34
+ | ` RestSharp ` | The core library, including ` System.Text.Json ` serializer and basical XML serializer |
35
+ | ` RestSharp.Serializers.NewtonsoftJson ` | Use ` Newtonsoft.Json ` as a JSON serializer |
36
+ | ` RestSharp.Serializers.Xml ` | Use custom RestSharp XML serializer for XML |
37
+ | ` RestSharp.Serializers.CsvHelper ` | Use ` CsvHelper ` as a CSV serializer |
33
38
34
39
## Code of Conduct
35
40
@@ -54,6 +59,8 @@ Read the docs: [Official Site][1]
54
59
55
60
Ask a question on StackOverflow with the tag ` restsharp ` .
56
61
62
+ Join RestSharp Discord server: [ ![ Discord] ( https://img.shields.io/discord/1224723555053207612?label=Discord )] ( https://discord.gg/NdpzHZ2qep )
63
+
57
64
Find RestSharp on Twitter: [ @RestSharp ] [ 2 ]
58
65
59
66
## Community
@@ -65,13 +72,15 @@ This project is a part of the [.NET Foundation](https://dotnetfoundation.org).
65
72
### Code Contributors
66
73
67
74
This project exists thanks to all the people who contribute.
68
- < a href = " https://github.com/restsharp/RestSharp/graphs/contributors " >< img src =" https://opencollective.com/RestSharp/contributors.svg?width=890&button=false " /></ a >
75
+ [ < img src =" https://opencollective.com/RestSharp/contributors.svg?width=890&button=false " > ] ( https://github.com/restsharp/RestSharp/graphs/contributors )
69
76
70
77
### Financial Contributors
71
78
72
79
Become a financial contributor and help us sustain our community. [ Contribute] ( https://github.com/sponsors/restsharp )
73
80
74
- ### License: Apache License 2.0
81
+ ## License
82
+
83
+ [ Apache License 2.0] ( https://github.com/restsharp/RestSharp/blob/dev/LICENSE.txt )
75
84
76
85
[ 1 ] : https://restsharp.dev
77
86
[ 2 ] : https://twitter.com/RestSharp
0 commit comments