Skip to content

Library to make RESTful calls in .NET applications.

License

Notifications You must be signed in to change notification settings

agero-core/rest-caller

Repository files navigation

REST Caller

NuGet Version NuGet Downloads

Library to make RESTful calls in .NET applications.

  • Create REST caller
var caller = new RESTCaller();
  • Make GET RESTfull call
// Making GET call to https://jsonplaceholder.typicode.com/posts?userId=1 
var getResponse = await caller.GetAsync(
    uri: new Uri("https://jsonplaceholder.typicode.com/posts"),
    parameters: new Dictionary<string, string>
    {
        {"userId", "1"}
    });
  • Make POST RESTfull call
// Making GET call to https://jsonplaceholder.typicode.com/posts
var postResponse = await caller.PostAsync(
    uri: new Uri("https://jsonplaceholder.typicode.com/posts"),
    body: @"{ ""title"": ""foo"", ""body"": ""bar"", ""userId"": 1 }");

Please refer to IRESTCaller and RESTCallerExtensions for more details.

Releases

No releases published

Packages

No packages published

Languages