Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't post form-urlencoded data #364

Open
gegnew opened this issue Apr 16, 2024 · 1 comment
Open

Can't post form-urlencoded data #364

gegnew opened this issue Apr 16, 2024 · 1 comment

Comments

@gegnew
Copy link

gegnew commented Apr 16, 2024

this is just curl -XPOST <url> -d 'key=val but it doesn't seem possible with rest.nvim. Is there a solution to this?

Referenced disussion:

Originally posted by @jwhoami in #259

@Drowze
Copy link

Drowze commented Apr 23, 2024

Also going through the same. I'd like to use this for quick prototyping - but unfortunately not supporting application/x-www-form-urlencoded is a major block for me 🤔

For instance, I've been trying with:

POST https://login.microsoftonline.com/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/oauth2/v2.0/token
content-type: application/x-www-form-urlencoded

scope=https://graph.microsoft.com/.default&client_id=ffffffff-gggg-hhhh-iiii-jjjjjjjjjjjj&client_secret=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&grant_type=client_credentials

And this is the error I get:

[rest.nvim] ERROR: The tree-sitter node at the range [0:0 - 3:174] has a syntax error and cannot be parsed
Error executing Lua callback: .../share/nvim/lazy/rest.nvim/lua/rest-nvim/parser/init.lua:143: attempt to index local 'document_node' (a nil value)
stack traceback:
        .../share/nvim/lazy/rest.nvim/lua/rest-nvim/parser/init.lua:143: in function 'traverse_variables'
        .../share/nvim/lazy/rest.nvim/lua/rest-nvim/parser/init.lua:436: in function 'parse'
        ...al/share/nvim/lazy/rest.nvim/lua/rest-nvim/functions.lua:61: in function 'exec'
        ...cal/share/nvim/lazy/rest.nvim/lua/rest-nvim/commands.lua:44: in function 'impl'
        ...cal/share/nvim/lazy/rest.nvim/lua/rest-nvim/commands.lua:182: in function <...cal/share/nvim/lazy/rest.nvim/lua/rest-nvim/commands.lua:165>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants