I'm trying to use httprepl to test endpoints in my ASP.NET app. When I tried to run a POST request my Command Prompt returned:
The default editor must be configured using the command `pref set editor.command.default "{commandLine}"`.
So I set it with the following command:
pref set editor.command.default "C:\Users\User\AppData\Local\Programs\Microsoft VS Code\Code.exe"
Then I get a warning:
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.
I don't know what to do at this point. I tried:
pref set editor.command.default.arguments "-w"
I'm not sure whether that worked or not, but when I try to repeat the command to set VS Code as my default editor, I get the same warning. Have I got that right?
I think you might have already figured it out. However, since I got the same error (using nodejs and httprepl instead), I just post my answer for others' reference. For me, it had nothing to do with the "default editor", I only need to add -c "{}"
after post
.
post -c "{}"
the -c provides an (empty in this case) inline HTTP request body. you may also provide some other stuff like: -c "{'id':2,'name':'Cherry'}"
according to this
Wish you all the best and have a peaceful day
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.