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

Allow omitting version asterisk (e.g. allow HTTP 200 rather than just HTTP/* 200) #975

Closed
jmoore34 opened this issue Nov 8, 2022 · 2 comments · Fixed by #981
Closed
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@jmoore34
Copy link

jmoore34 commented Nov 8, 2022

When the HTTP version is not important, it would be nice if you could write e.g. HTTP 200 instead of only HTTP/* 200 (i.e. supporting both syntaxes). In general, I think simple, intuitive syntax is one of Hurl's strengths, and I think supporting this would help further this goal, especially because it's similar to what you might see in a browser developer console.

@jmoore34 jmoore34 changed the title Allow omitting version asterisk (e.g. allow HTTP 200 rather than just HTTP/* 200 Allow omitting version asterisk (e.g. allow HTTP 200 rather than just HTTP/* 200) Nov 8, 2022
@fabricereix
Copy link
Collaborator

I like it!
We could indeed remove the version check by simply removing fully the version part.

@jcamiel jcamiel self-assigned this Nov 9, 2022
@fabricereix
Copy link
Collaborator

@jcamiel
for the grammar/AST, I would see the HTTP version as optional

response:
  lt*
  "HTTP" version? sp status lt
  header*
  response-section*
  body?

version:
    "/1.0"
  | "/1.1"
  | "/2"

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

Successfully merging a pull request may close this issue.

4 participants