-
Notifications
You must be signed in to change notification settings - Fork 1
/
.http
52 lines (45 loc) · 1.91 KB
/
.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
### Post
POST http://localhost:3000/api/create
Content-Type: application/json
{
"fact": "Mike the Headless Chicken, also known as Miracle Mike, was a Wyandotte chicken that lived for 18 months without a head. On September 10, 1945, farmer Lloyd Olsen of Fruita, Colorado, was preparing Mike for dinner by chopping off his head. To Olsen's surprise, Mike survived the decapitation and continued to live, albeit headless. Amazed by Mike's resilience, Olsen decided to care for him, feeding him with a dropper directly into his esophagus. Mike became a celebrity, touring sideshows and earning an estimated $4,500 per month. He eventually succumbed to his headless condition on March 17, 1947, after choking on a piece of corn. Mike's legacy lives on as a symbol of survival against all odds.",
"category": ["Bizarre Facts", "Animal Facts"],
"lang": "English"
}
### subscribe to newsletter
POST http://localhost:3000/newsletter/subscribe
Content-Type: application/json
{
"email": "ddvital0@gmail.com"
}
### Get fact by id
GET http://localhost:3000/api/fact?factId=66415cd9268f8817ec3d8f35&apiToken=6633d86277b448377cad205c
Content-Type: application/json
### create many
POST http://localhost:3000/api/create-many
Content-Type: application/json
[
{
"fact": "The Earth is the only planet not named after a god.",
"category": ["Science", "Astronomy"],
"lang": "English"
},
{
"fact": "Bananas are berries, but strawberries aren't.",
"category": ["Food", "Botany"],
"lang": "English"
},
{
"fact": "Octopuses have three hearts.",
"category": ["Biology", "Marine Life"],
"lang": "English"
},
{
"fact": "The shortest war in history was between Britain and Zanzibar on August 27, 1896. Zanzibar surrendered after 38 minutes.",
"category": ["History", "Warfare"],
"lang": "English"
}
]
### get
GET http://localhost:3000/api/all?apiToken=6633d86277b448377cad205c
Content-Type: application/json