DotNetHelper-HttpClient is a simple lightweight library for executing restful requests. Easy Integration with polly. Support both asynchronous and synchronous operation
|| Change Log • || View on Github||
| Package | Tests | Code Coverage |
|---|---|---|
| Continous Integration | Windows | Linux | MacOS |
|---|---|---|---|
| AppVeyor | |||
| Azure Devops |
- All apis are available in both asynchronous and synchronous operation
var client = new RestClient();
var json = client.GetString($"https://jsonplaceholder.typicode.com/todos/1", Method.Get);var client = new RestClient();
var stream = client.GetStream($"https://jsonplaceholder.typicode.com/todos/1", Method.Get);var client = new RestClient();
var bytes = client.GetBytes($"https://jsonplaceholder.typicode.com/todos/1", Method.Get);var client = new RestClient();
var httpResponse = client.GetHttpResponse($"https://jsonplaceholder.typicode.com/todos/1", Method.Get);var client = new RestClient();
// The first parameter takes a Func<string, T> this allows you to implement your own deserializer
// In doing so this will prevent the library from needing to depending on third party libraries for serialization
var employee = client.Get(JsonConvert.DeserializeObject<Employee>,$"https://jsonplaceholder.typicode.com/todos/1", Method.Get);For more information, please refer to the Officials Docs