aboutsummaryrefslogtreecommitdiffstats
path: root/tests/query/injections/http/injections.http
blob: 0f339cb6f97ff7036f568c16e1b3337b689ac342 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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