-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
http language file format support #5
Labels
enhancement
New feature or request
Milestone
Comments
sassman
changed the title
stabilizing the bookmark file format
rest client plugin http language file format support
Nov 3, 2022
4 tasks
sassman
added a commit
that referenced
this issue
Dec 16, 2022
implements #5 done: - [x] add `HttpVersion` to `HttpRequest` - [x] implement http template file body parsing + test todos: - [ ] implement http body to curl parameter mapping - [ ] implement external file enum behavior - [ ] implement templating on body content Signed-off-by: Sven Kanoldt <sven@d34dl0ck.me>
sassman
added a commit
that referenced
this issue
Jan 7, 2023
implements #5 done: - [x] add `HttpVersion` to `HttpRequest` - [x] implement http template file body parsing + test - [x] implement http body to curl parameter mapping todos: - [ ] implement external file enum behavior - [ ] implement templating on body content Signed-off-by: Sven Kanoldt <sven@d34dl0ck.me>
sassman
changed the title
rest client plugin http language file format support
http language file format support
Jan 7, 2023
This was referenced Jan 7, 2023
sassman
added a commit
that referenced
this issue
Feb 1, 2023
## CAUTION! This is an experiment The whole reason for this experiment is to get closer to the http plugin template syntax as linked in #5 There the vscode plugin [has this concept of system variables](https://marketplace.visualstudio.com/items?itemName=humao.rest-client#system-variables) that follow the syntax of a mix of expression and function e.g. - {{$randomInt min max}}: Returns a random integer between min (included) and max (excluded) - {{$dotenv [%]variableName}}: Returns the environment value stored in the .env file which exists in the same directory of your .http file. Both examples show that `$<ident>` is similar to a function name and then a variable argument list is passed without any braces like `()`. This experiment focuses on the ability to register functions for this very system variable syntax at compile time in an extensible fashion. done so far: - lexing and parsing of very basic templates with an expression `{{ var }}` - basic runtime to interpret the ast - some tests added - design of a Visitor pattern for the AST yet open - [ ] tests for unhappy path are to less - [ ] runtime is very incomplete yet, `SysVar` hooked functions are missing e.g. `hello {{ $processEnv HOME }}` Signed-off-by: Sven Kanoldt <sven@d34dl0ck.me>
2 tasks
sassman
added a commit
that referenced
this issue
Feb 1, 2023
## CAUTION! This is an experiment The whole reason for this experiment is to get closer to the http plugin template syntax as linked in #5 There the vscode plugin [has this concept of system variables](https://marketplace.visualstudio.com/items?itemName=humao.rest-client#system-variables) that follow the syntax of a mix of expression and function e.g. - {{$randomInt min max}}: Returns a random integer between min (included) and max (excluded) - {{$dotenv [%]variableName}}: Returns the environment value stored in the .env file which exists in the same directory of your .http file. Both examples show that `$<ident>` is similar to a function name and then a variable argument list is passed without any braces like `()`. This experiment focuses on the ability to register functions for this very system variable syntax at compile time in an extensible fashion. done so far: - lexing and parsing of very basic templates with an expression `{{ var }}` - basic runtime to interpret the AST - some tests added - design of a Visitor pattern for the AST yet open - [ ] tests for unhappy path are to less - [ ] runtime is very incomplete yet, `SysVar` hooked functions are missing e.g. `hello {{ $processEnv HOME }}` Signed-off-by: Sven Kanoldt <sven@d34dl0ck.me>
sassman
added a commit
that referenced
this issue
Feb 9, 2023
## CAUTION! This is an experiment The whole reason for this experiment is to get closer to the http plugin template syntax as linked in #5 There the vscode plugin [has this concept of system variables](https://marketplace.visualstudio.com/items?itemName=humao.rest-client#system-variables) that follow the syntax of a mix of expression and function e.g. - {{$randomInt min max}}: Returns a random integer between min (included) and max (excluded) - {{$dotenv [%]variableName}}: Returns the environment value stored in the .env file which exists in the same directory of your .http file. Both examples show that `$<ident>` is similar to a function name and then a variable argument list is passed without any braces like `()`. This experiment focuses on the ability to register functions for this very system variable syntax at compile time in an extensible fashion. done so far: - lexing and parsing of very basic templates with an expression `{{ var }}` - basic runtime to interpret the AST - some tests added - design of a Visitor pattern for the AST yet open - [ ] tests for unhappy path are to less - [ ] runtime is very incomplete yet, `SysVar` hooked functions are missing e.g. `hello {{ $processEnv HOME }}` Signed-off-by: Sven Kanoldt <sven@d34dl0ck.me>
sassman
added a commit
that referenced
this issue
Feb 28, 2023
The whole reason for this experiment is to get closer to the http plugin template syntax as linked in #5 There the vscode plugin [has this concept of system variables](https://marketplace.visualstudio.com/items?itemName=humao.rest-client#system-variables) that follow the syntax of a mix of expression and function e.g. - {{$randomInt min max}}: Returns a random integer between min (included) and max (excluded) - {{$dotenv [%]variableName}}: Returns the environment value stored in the .env file which exists in the same directory of your .http file. Both examples show that `$<ident>` is similar to a function name and then a variable argument list is passed without any braces like `()`. This experiment focuses on the ability to register functions for this very system variable syntax at compile time in an extensible fashion. done so far: - lexing and parsing of very basic templates with an expression `{{ var }}` - basic runtime to interpret the AST - some tests added - design of a Visitor pattern for the AST yet open - [ ] tests for unhappy path are to less - [ ] runtime is very incomplete yet, `SysVar` hooked functions are missing e.g. `hello {{ $processEnv HOME }}`
sassman
added a commit
that referenced
this issue
Feb 28, 2023
The whole reason for this experiment is to get closer to the http plugin template syntax as linked in #5 There the vscode plugin [has this concept of system variables](https://marketplace.visualstudio.com/items?itemName=humao.rest-client#system-variables) that follow the syntax of a mix of expression and function e.g. - {{$randomInt min max}}: Returns a random integer between min (included) and max (excluded) - {{$dotenv [%]variableName}}: Returns the environment value stored in the .env file which exists in the same directory of your .http file. Both examples show that `$<ident>` is similar to a function name and then a variable argument list is passed without any braces like `()`. This experiment focuses on the ability to register functions for this very system variable syntax at compile time in an extensible fashion. done so far: - lexing and parsing of very basic templates with an expression `{{ var }}` - basic runtime to interpret the AST - some tests added - design of a Visitor pattern for the AST yet open - [ ] tests for unhappy path are to less - [ ] runtime is very incomplete yet, `SysVar` hooked functions are missing e.g. `hello {{ $processEnv HOME }}`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
support for the http language file format used by the
Note: It might be good to go with one or the other as a bookmark file format.
Examples
Breaks down into
.http
files #32The text was updated successfully, but these errors were encountered: