Skip to content

Commit b90eb99

Browse files
committed
Roles: add sample readme
1 parent 32690d6 commit b90eb99

File tree

1 file changed

+22
-0
lines changed
  • doc/code_snippets/snippets/config/instances.enabled/application_role_http_api

1 file changed

+22
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# HTTP API
2+
3+
A sample application showing how to implement a custom `http-api` role.
4+
5+
## Running
6+
7+
To start an application, execute the following command in the [config](../../../config) directory:
8+
9+
```console
10+
$ tt start application_role_http_api
11+
```
12+
13+
## Making test requests
14+
15+
To test the API, make the following requests:
16+
17+
```console
18+
$ curl -X GET --location "http://0.0.0.0:8080/band?limit=7" \
19+
-H "Accept: application/json"
20+
$ curl -X GET --location "http://0.0.0.0:8080/band/5" \
21+
-H "Accept: application/json"
22+
```

0 commit comments

Comments
 (0)