rest-nvim / rest.nvim

A fast Neovim http client written in Lua
GNU General Public License v3.0
1.35k stars 118 forks source link

adding custom header cause error #346

Open onns opened 2 months ago

onns commented 2 months ago

in the example files, it works when I add header Content-Type: application/json after the url, but if I add some lines like Header2: Value2, something error happens. So is there any way to add custom header?(POST some url that need auth header)

example file: https://github.com/rest-nvim/rest.nvim/blob/main/tests/reqs/post_create_user.http

POST https://reqres.in/api/users
Content-Type: application/json

{
    "name": "morpheus",
    "job": "leader",
    "array": ["a", "b", "c"],
    "object_ugly_closing": {
      "some_key": "some_value"
    }
}

error:

[rest.nvim] ERROR: The tree-sitter node at the range [32:0 - 43:0] has a syntax error and cannot be parsed