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

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

Our great sponsors
  • Onboard AI - ChatGPT with full context of any GitHub repo.
  • WorkOS - The modern API for authentication & user identity.
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • 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.

  • Onboard AI

    ChatGPT with full context of any GitHub repo. Onboard AI learns any GitHub repo in minutes and lets you chat with it to locate functionality, understand different parts, and generate new code. Use it for free at app.getonboardai.com.

  • 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