我正在学习 Microsoft Learn 教程“使用 ASP.Net Core 创建 Web API ”。
在“构建和测试 Web API”标题下的说明 (5) 中,我收到响应“无法找到 OpenAPI 描述”。
对于步骤 (6),当执行“ls”命令时,我得到响应:“尚未设置目录结构,因此没有可列出的内容。使用‘connect’命令根据 OpenAPI 描述设置目录结构”。我已经尝试了此处建议的“connect”命令,并尝试了“dir”作为“ls”的替代品。
我可以在步骤 (7) 中成功更改目录并执行步骤 (8) 的 GET 请求并收到预期的回复。然而,真正让我困扰的是“ls”命令在这里不起作用,并且似乎是 httprepl 工具的一个重要功能。
我怎样才能让“ls”命令在这里工作或告诉我为什么它不起作用?
C:\Users\xxxx\source\repos\Learn\ContosoPizza>httprepl http://localhost:5000
(Disconnected)> connect http://localhost:5000
Using a base address of http://localhost:5000/
Unable to find an OpenAPI description
For detailed tool info, see https://aka.ms/http-repl-doc
http://localhost:5000/> ls
No directory structure has been set, so there is nothing to list. Use the "connect" command to set a directory structure based on …Run Code Online (Sandbox Code Playgroud)