使用 HttpRepl 浏览、测试 Web API

The HTTP Read-Eval-Print Loop (REPL) 

  • 一种轻量级跨平台命令行工具,在所有支持的 .NET Core 的位置都可得到支持。
  • 用于发出 HTTP 请求以测试 ASP.NET Core Web API(和非 ASP.NET Core web API)并查看其结果。
  • 可以在任何环境下测试托管的 web API,包括 localhost 和 Azure 应用服务。

安装:dotnet tool install -g Microsoft.dotnet-httprepl

(视频)使用 HttpRepl 浏览 Web API:

https://learn.microsoft.com/zh-cn/shows/beginners-series-to-web-apis/exploring-web-apis-with-the-httprepl-16-of-18–beginners-series-to-web-apis

使用 HttpRepl 测试 Web API

https://learn.microsoft.com/zh-cn/aspnet/core/web-api/http-repl/?view=aspnetcore-8.0&tabs=windows

HttpRepl:用于与 RESTful HTTP 服务交互的命令行工具

https://devblogs.microsoft.com/dotnet/httprepl-a-command-line-tool-for-interacting-with-restful-http-services/#configure-visual-studio-for-windows-to-launch-httprepl-on-f5

HttpRepl GitHub 存储库https://github.com/dotnet/HttpRepl

CentOS Install .NET Core

.NET Tutorial – Hello World in 10 minutes

https://www.microsoft.com/net/learn/get-started-with-dotnet-tutorial

Add the dotnet product feed

Before installing .NET, you’ll need to register the Microsoft key, register the product repository, and install required dependencies. This only needs to be done once per machine.

Open a command prompt and run the following commands:

sudo rpm -Uvh https://packages.microsoft.com/config/rhel/7/packages-microsoft-prod.rpm

Install .NET Core SDK on Linux CentOS / Oracle

https://www.microsoft.com/net/download/linux-package-manager/centos/sdk-current

sudo yum update
sudo yum install dotnet-sdk-2.1

Install .NET Core Runtime on Linux CentOS / Oracle

https://www.microsoft.com/net/download/linux-package-manager/centos/runtime-current

sudo yum update
sudo yum install aspnetcore-runtime-2.1