You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- This page is subject to change. It is requested to check this page frequently.
8
8
:::
9
9
10
-
The Http specification format is how anyone express a Http request. Following is the full reference to write Http specification file.
10
+
The **Http specification format** is how anyone express a Http request. Following is the full reference to write Http specification file.
11
11
12
-
Http specification document is a versioned document, meaning there MUST be a `version:` key on the document.
12
+
Http specification document is a _**versioned document**_, meaning there MUST be a `version:` key on the document.
13
13
14
-
> [TBD]It's also an exposable document meaning, you can expose local variables to whatever other spec. document it's called from.
14
+
It's also an _**exposable document**_ meaning you can expose local data using `expose:` key in the document. More on this in [variable spec. reference](/references/variable-reference)
15
15
16
-
### Reference as example
16
+
### All supported nodes in http specification document
# if not available, or set as null, returns all parts of response
111
-
return: ~
118
+
expose: ~
112
119
```
113
120
114
121
---
115
122
### `version` (<small>_`required`_</small>)
116
123
117
-
`version`is a top-level block that defines a document version. How to write a `version:` block, is [already defined here](/references/version-reference).
124
+
`version`is a top-level block that defines a document version. How to write a `version:` block is already defined in [_version reference_](/references/version-reference).
118
125
119
126
### `variables`
120
127
121
-
`variables`is a top-level block that defines local variables. These variables are file scoped. How to write a `variables:` block, is [already defined here](/references/variable-reference).
128
+
`variables`is a top-level block that defines local variables. These variables are file scoped. How to write a `variables:` block is already defined in [_variable-reference_](/references/variable-reference).
129
+
130
+
One special local variable named `_response` get added after the response received successfully. This local variable is accessible under [_exposable block_](/references/variable-reference#exposable).
122
131
123
132
### `request` (<small>_`required`_</small>)
124
133
125
-
`request`is a `_required_` block that defines a http request. It's also a returnable block, meaning it have some scoped variables (namely `return:` sub-block) those represents several sub-part of response received afterward. See [`return:`](#requestreturn) for details.
134
+
`request`is a `_required_` block that defines a http request. This holds many other nodes that constructs an http request.
`request.return`is a sub-block. It's actually not a part of `request` block, meaning it don't define any request parameter unlike others mentioned above. Rather, this block is used to mention what data to return after the response have been received.
287
-
288
-
Supported values:
289
-
290
-
- `.version`
291
-
- `.code`
292
-
- `.reason`
293
-
- `.headers`
294
-
- `.body`
295
-
296
-
If not available, or set as null, returns all parts of response.
297
-
298
-
```yaml
299
-
request:
300
-
return: ~
301
-
```
304
+
See docs on [expose node](/references/variable-reference#expose-node)
0 commit comments