Closed kvrohit closed 1 week ago
0.10.2
Ubuntu (WSL)
Variables do not expand with POST content type application/x-www-form-urlencoded
POST
application/x-www-form-urlencoded
Variable expansion should be supported.
### # @name PostTest @var=bar POST https://postman-echo.com/post Content-Type: application/x-www-form-urlencoded
foo={{var}}
2. Execute the request. 3. Observe the response from the server. ### Other information Response:
{ "args": {}, "data": "", "files": {}, "form": { "foo": "{{var}}" }, "headers": { "host": "postman-echo.com", "x-request-start": "t=1730401174.207", "connection": "close", "content-length": "11", "x-forwarded-proto": "https", "x-forwarded-port": "443", "x-amzn-trace-id": "Root=1-6723d396-0cbe909e583e8e94479fda5e", "accept": "/", "content-type": "application/x-www-form-urlencoded", "user-agent": "rest.nvim v3.8.3", "cookie": "sails.sid=s%3AGNXG-3IYuvRIqpi1Or_CrvPKWsX6fJb8.uB%2BjZkyfdaQldk28UBWfipofF%2BJ9SRmqeKOA8tG0tGo" }, "json": { "foo": "{{var}}" }, "url": "https://postman-echo.com/post" }
### Repro (`lazy.nvim`) ```lua vim.env.LAZY_STDPATH = ".repro" load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() require("lazy.minit").repro({ spec = { "rest-nvim/rest.nvim", { "nvim-treesitter/nvim-treesitter", build = ":TSUpdate", main = "nvim-treesitter.configs", opts = { ensure_installed = { "http" }, sync_install = false, highlight = { enable = true }, indent = { enable = true }, }, }, }, })
Prerequisites
Neovim Version
0.10.2
Operating system/version
Ubuntu (WSL)
Actual behavior
Variables do not expand with
POST
content typeapplication/x-www-form-urlencoded
Expected behavior
Variable expansion should be supported.
Steps to reproduce
POST
request with the following content:foo={{var}}
{ "args": {}, "data": "", "files": {}, "form": { "foo": "{{var}}" }, "headers": { "host": "postman-echo.com", "x-request-start": "t=1730401174.207", "connection": "close", "content-length": "11", "x-forwarded-proto": "https", "x-forwarded-port": "443", "x-amzn-trace-id": "Root=1-6723d396-0cbe909e583e8e94479fda5e", "accept": "/", "content-type": "application/x-www-form-urlencoded", "user-agent": "rest.nvim v3.8.3", "cookie": "sails.sid=s%3AGNXG-3IYuvRIqpi1Or_CrvPKWsX6fJb8.uB%2BjZkyfdaQldk28UBWfipofF%2BJ9SRmqeKOA8tG0tGo" }, "json": { "foo": "{{var}}" }, "url": "https://postman-echo.com/post" }