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
Copy file name to clipboardExpand all lines: docs/examples/http-examples.md
+3-55Lines changed: 3 additions & 55 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: Http spec. examples
2
+
title: Http examples
3
3
---
4
4
5
5
:::note
@@ -8,11 +8,10 @@ title: Http spec. examples
8
8
:::
9
9
10
10
:::note
11
-
Case-wise more example can be found in `tests/resources/storage/sample_config` directory of [https://github.com/chkware/cli](https://github.com/chkware/cli/tree/main/tests/resources/storage/sample_config) repository
11
+
Case-wise more example can be found in [https://github.com/chkware/cli](https://github.com/chkware/cli/tree/main/tests/resources/storage/sample_config) repository
Following examples are using HTTP _GET_ and _POST_ method. Although all these example are still valid for _POST_, _PUT_, _PATCH_, _DELETE_, _OPTIONS_, _HEAD_ method as well. You can still send a request body with _GET_ or _HEAD_ method for the sake of testing API.
18
17
@@ -255,54 +254,3 @@ request:
255
254
</book>
256
255
</catalog>
257
256
```
258
-
259
-
---
260
-
## Request using variable examples
261
-
262
-
We can also use variables inside a http specification file. See examples below.
263
-
264
-
** * This is highly experimental. Report any bug you can find.**
265
-
266
-
### Request with query string using variables
267
-
268
-
```yaml
269
-
---
270
-
version: default:http:0.7.2
271
-
272
-
# define local variables
273
-
variables:
274
-
Foo: 'bar'
275
-
Two: 2
276
-
Server: https://example.org/api
277
-
278
-
request:
279
-
# put variables on the path for query string
280
-
url: {$Server}/path?foo={$Foo}&two={$Two}
281
-
method: GET
282
-
```
283
-
284
-
### Request with basic authentication header using variables
- This page should be use as reference for specification files.
7
+
- This page is subject to change. It is requested to check this page frequently.
8
+
:::
9
+
10
+
:::note
11
+
Case-wise more example can be found in [https://github.com/chkware/cli](https://github.com/chkware/cli/blob/main/tests/resources/storage/sample_config/bitcoin-usd-testcase.chk) repository
0 commit comments