[英]How "to ensure proper integration between HttpRepl and Visual Studio Code."?
我正在尝试使用 httprepl 在我的 ASP.NET 应用程序中测试端点。 当我尝试运行 POST 请求时,我的命令提示符返回:
The default editor must be configured using the command `pref set editor.command.default "{commandLine}"`.
所以我用以下命令设置它:
pref set editor.command.default "C:\Users\User\AppData\Local\Programs\Microsoft VS Code\Code.exe"
然后我收到一个警告:
If your default editor is Visual Studio Code, you should set the default command arguments (`editor.command.default.arguments`) to include `-w` or `--wait` to ensure proper integration between HttpRepl and Visual Studio Code.
我现在不知道该怎么办。 我试过了:
pref set editor.command.default.arguments "-w"
我不确定这是否有效,但是当我尝试重复该命令以将 VS Code 设置为我的默认编辑器时,我得到了相同的警告。 我说对了吗?
我想你可能已经想通了。 但是,由于我遇到了同样的错误(使用 nodejs 和 httprepl 代替),我只是发布我的答案供其他人参考。 对我来说,它与“默认编辑器”无关,我只需要在post
之后添加-c "{}"
。
post -c "{}"
-c 提供了一个(在这种情况下为空)内联 HTTP 请求正文。 您还可以根据此提供一些其他内容,例如: -c "{'id':2,'name':'Cherry'}"
祝你一切顺利,度过一个平静的一天
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.