ASP.NET Core - how to properly make a GET request?

This page summarizes the projects mentioned and recommended in the original post on reddit.com/r/dotnet

Our great sponsors
  • SonarLint - Clean code begins in your IDE with SonarLint
  • InfluxDB - Access the most powerful time series database as a service
  • SaaSHub - Software Alternatives and Reviews
  • RestEase

    Easy-to-use typesafe REST API client library for .NET Standard 1.1 and .NET Framework 4.5 and higher, which is simple and customisable. Inspired by Refit

    Use RestEase to create your own client library. Refit is a very similar and more popular library. IMO RestEase is an improvement over Refit and I prefer it, but either will solve your problems. Both are libs that have you build interfaces describing the API endpoints, then the library handles all the boilerplate code that calls HttpClient.

  • Refit

    The automatic type-safe REST library for .NET Core, Xamarin and .NET. Heavily inspired by Square's Retrofit library, Refit turns your REST API into a live interface.

    Use RestEase to create your own client library. Refit is a very similar and more popular library. IMO RestEase is an improvement over Refit and I prefer it, but either will solve your problems. Both are libs that have you build interfaces describing the API endpoints, then the library handles all the boilerplate code that calls HttpClient.

  • SonarLint

    Clean code begins in your IDE with SonarLint. Up your coding game and discover issues early. SonarLint is a free plugin that helps you find & fix bugs and security issues from the moment you start writing code. Install from your favorite IDE marketplace today.

  • RestSharp

    Simple REST and HTTP API Client for .NET

    Use RestSharp to create a client library. It requires you to write more code, but it's still a lot less boilerplate than using HttpClient directly.

  • Flurl.Http

    Fluent URL builder and testable HTTP client for .NET

    I would also add flurl to that list https://flurl.dev/. It's an amazing library and can be super helpful for quick one off API calls.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts