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

"origin-form" (Path/Target-Only) Request Line #2409

Open
louy2 opened this issue Feb 9, 2024 · 0 comments
Open

"origin-form" (Path/Target-Only) Request Line #2409

louy2 opened this issue Feb 9, 2024 · 0 comments
Labels
enhancement New feature or request topic: request

Comments

@louy2
Copy link

louy2 commented Feb 9, 2024

Problem to solve

Making origin-form request line valid in Hurl file.

Proposal

Change the parser to allow request lines resembling:

METHOD /path

As proposed in #547, host can be inferred from the Host header.

Protocol can be set with the option proto-default.

Additional context and resources

curl doc has this to say about the scheme part of the URL:

As a convenience, curl also allows users to leave out the scheme part from URLs. Then it guesses which protocol to use based on the first part of the hostname.
You can modify the default protocol to something other than HTTP with the --proto-default option.
-- Without Scheme

In addition, HTTP/2 defines "pseudo-headers" corresponding to parts in the URI.

o The ":method" pseudo-header field includes the HTTP method.
o The ":scheme" pseudo-header field includes the scheme portion of the target URI.
o The ":authority" pseudo-header field includes the authority portion of the target URI.
o The ":path" pseudo-header field includes the path and query parts of the target URI. [...] A request in asterisk form includes the value '*' for the ":path" pseudo-header field.

That said I am not sure what syntax to use in Hurl file for them.

Tasks to complete

TBD

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

No branches or pull requests

2 participants