Skip to content

query separator --- is sometimes used as a curl argument #172

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

Closed
teto opened this issue Jan 4, 2023 · 3 comments · Fixed by #300
Closed

query separator --- is sometimes used as a curl argument #172

teto opened this issue Jan 4, 2023 · 3 comments · Fixed by #300

Comments

@teto
Copy link
Collaborator

teto commented Jan 4, 2023

when testing #122, I realized some failures were due to --- being used as a curl argument.
Parsing the queries by "hand" is too error-prone. I hope a fix comes from a better usage of the treesitter grammer.

@teto
Copy link
Collaborator Author

teto commented Jan 6, 2023

seems like that behavior is kinda LGTM or rather --- is not a query separator as I expected. I've played a bit with the treesitter grammar and it's promising, could definitely improve the situation.

@simanga-dev
Copy link

Hello, How do I pass curl args ?

@PhilRunninger
Copy link
Contributor

PhilRunninger commented Oct 2, 2023

Hi @H3ndry,

It seems to be that a blank line is required to find the end of the headers. After that blank line, is where the curl args go. Issue #198 describes a situation that makes that blank line appear optional, but I believe it's best to include it. Here's an example.

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

--silent

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

# The next query works only because of a bug - issue #198. Proper syntax
# requires a blank line before curl args.
GET https://reqres.in/api/users
--silent

@NTBBloodbath NTBBloodbath mentioned this issue Mar 16, 2024
4 tasks
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

Successfully merging a pull request may close this issue.

3 participants