mirror of
https://github.com/morten-olsen/http.md.git
synced 2026-02-08 00:46:28 +01:00
feat: add javascript code block support (#13)
This commit is contained in:
17
docs/examples/with-javascript.md
Normal file
17
docs/examples/with-javascript.md
Normal file
@@ -0,0 +1,17 @@
|
||||
```javascript run
|
||||
input.test = "Hello World";
|
||||
```
|
||||
|
||||
::input[test]
|
||||
|
||||
```http json
|
||||
POST https://httpbin.org/post
|
||||
|
||||
{"input": "{{input.test}}"}
|
||||
|
||||
```
|
||||
|
||||
```javascript run,hidden
|
||||
// Use chai's `expect`, `assert` or `should` to make assumptions
|
||||
expect(response.body.json.input).to.equal("Hello World");
|
||||
```
|
||||
Reference in New Issue
Block a user