-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathapi.http
56 lines (35 loc) · 980 Bytes
/
api.http
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
### Basic
GET http://localhost:8080/greeting
### Simple Query
GET http://localhost:8080/greeting?query={"content": "Gustavo Leitão", "quantity": {"$lt": 100}}
### Like Query
GET http://localhost:8080/greeting?query={"content": {"$like": "%25Leitão"}}
### Number Query
GET http://localhost:8080/greeting?query={"quantity": 8}
### $gt query
GET http://localhost:8080/greeting?query={"quantity": {"$gt": 9}}
### $lt query
GET http://localhost:8080/greeting?query={"quantity": {"$lt": 9}}
### Projection
GET http://localhost:8080/greeting?fields=id&query={"quantity": 8}
### crete some data
POST http://localhost:8080/greeting
Content-Type: application/json
{
"content": "Fernanda Medeiros",
"quantity": 8
}
###
POST http://localhost:8080/greeting
Content-Type: application/json
{
"content": "Gustavo Leitão",
"quantity": 9
}
###
POST http://localhost:8080/greeting
Content-Type: application/json
{
"content": "Fernanda Leitão",
"quantity": 10
}