Skip to content

Commit edc167e

Browse files
authored
Fb/http file (#15)
* go back to cds7 service paths * some basic http request file * basic http files
1 parent 5291d22 commit edc167e

File tree

5 files changed

+101
-2
lines changed

5 files changed

+101
-2
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
### priority | alice
2+
GET {{base_url}}/rest/check/priority
3+
Authorization: Basic alice alice
4+
5+
### priority | bob
6+
GET {{base_url}}/rest/check/priority
7+
Authorization: Basic bob bob
8+
9+
### priority | clark
10+
GET {{base_url}}/rest/check/priority
11+
Authorization: Basic clark clark
12+
13+
### priority | danny
14+
GET {{base_url}}/rest/check/priority
15+
Authorization: Basic danny danny
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
### state
2+
GET {{base_url}}/rest/feature/state
3+
Authorization: Basic {{username}} {{password}}
4+
5+
### redis_update | check 1
6+
POST {{base_url}}/rest/feature/redisUpdate
7+
Authorization: Basic {{username}} {{password}}
8+
Content-Type: application/json
9+
10+
{
11+
"key": "/check/priority",
12+
"value": 1
13+
}
14+
15+
### redis_update | check 2
16+
POST {{base_url}}/rest/feature/redisUpdate
17+
Authorization: Basic {{username}} {{password}}
18+
Content-Type: application/json
19+
20+
{
21+
"key": "/check/priority",
22+
"value": 10,
23+
"scope": { "tenant": "people" }
24+
}
25+
26+
### redis_update | check 3
27+
POST {{base_url}}/rest/feature/redisUpdate
28+
Authorization: Basic {{username}} {{password}}
29+
Content-Type: application/json
30+
31+
{
32+
"key": "/check/priority",
33+
"value": 100,
34+
"scope": { "user": "[email protected]", "tenant": "people" }
35+
}
36+
37+
38+
### redis_update | memory 1
39+
POST {{base_url}}/rest/feature/redisUpdate
40+
Authorization: Basic {{username}} {{password}}
41+
Content-Type: application/json
42+
43+
{
44+
"key": "/memory/logInterval",
45+
"value": 1000
46+
}
47+
48+
### redis_update | memory 2
49+
POST {{base_url}}/rest/feature/redisUpdate
50+
Authorization: Basic {{username}} {{password}}
51+
Content-Type: application/json
52+
53+
{
54+
"key": "/memory/logInterval",
55+
"value": 100
56+
}
57+
58+
### redis_update | reset
59+
POST {{base_url}}/rest/feature/redisUpdate
60+
Authorization: Basic {{username}} {{password}}
61+
Content-Type: application/json
62+
63+
[
64+
{
65+
"key": "/check/priority",
66+
"value": null,
67+
"options": {
68+
"clearSubScopes": true
69+
}
70+
},
71+
{
72+
"key": "/memory/logInterval",
73+
"value": null,
74+
"options": {
75+
"clearSubScopes": true
76+
}
77+
}
78+
]
79+
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"local": {
3+
"base_url": "http://localhost:4004",
4+
"username": "alice",
5+
"password": "alice"
6+
}
7+
}
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
@protocol: 'rest'
22
@impl: './../handler/check-service.js'
3-
@path: '/check'
43
service CheckService {
54
function priority() returns String;
65
}

example-cap-server/srv/service/feature-service.cds

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
@protocol: 'rest'
22
@impl: './../handler/feature-service.js'
33
@(requires: 'authenticated-user')
4-
@path: '/feature'
54
// NOTE: in practice this needs proper security restrictions
65
service FeatureService {
76
type JSON {};

0 commit comments

Comments
 (0)