rest.nvim
rest.nvim copied to clipboard
Can't post form data
Trying to run this:
POST http://localhost:3000/api/register
Accept: application/json
-F name="Shisir"
Gives this output:
Error executing vim.schedule lua callback: ...al/share/nvim/lazy/rest.nvim/lua/rest-nvim/curl/init.lua:53: post http://localhost:3000/api/register -
curl error exit_code=2 stderr={}
stack traceback:
[C]: in function 'error'
...al/share/nvim/lazy/rest.nvim/lua/rest-nvim/curl/init.lua:53: in function ''
vim/_editor.lua: in function <vim/_editor.lua:0>
Here is the curl command from preview:
curl -sSL --compressed -X 'POST' -H 'Accept: application/json' --data-raw '' -F 'name="Shisir"' 'http://localhost:3000/api/register'
If I run the above command manually in terminal it also fails but without the --data-raw '' part it works.
What am I doing wrong? Any help will be greatly appreciated.