feat(http): more comprehensive highlights

This commit is contained in:
Riley Bruins 2024-11-02 19:55:35 -07:00 committed by Christian Clason
parent eff88f4e8b
commit 2d5c122af9
3 changed files with 68 additions and 2 deletions

View file

@ -0,0 +1,21 @@
### post-request script
GET https://jsonplaceholder.typicode.com/posts/3
# @lang=lua
> {%
local body = vim.json.decode(response.body)
client.global.set("postId", body.id)
-- ^ @lua
%}
### run request with variable
GET https://jsonplaceholder.typicode.com/posts/{{postId}}
> {%
client.global.set("auth_token", response.body.jwt);
// ^ @javascript
%}
### vim: ft=http