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

adding custom header cause error #346

Open
onns opened this issue Apr 3, 2024 · 0 comments
Open

adding custom header cause error #346

onns opened this issue Apr 3, 2024 · 0 comments

Comments

@onns
Copy link

onns commented Apr 3, 2024

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
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

1 participant