POST
/joke
curl \
--request POST 'https://joke_api.example.com/joke' \
--header "Content-Type: application/json" \
--data '{"joke":"Knock Knock. Who's there? Hike. Hike Who?","category":"KnockKnock","punchline":"I didn't know you liked Japanese poetry."}'
Request examples
Jokewithpunchline
{
"joke": "Knock Knock. Who's there? Hike. Hike Who?",
"category": "KnockKnock",
"punchline": "I didn't know you liked Japanese poetry."
}
{
"joke": "He had a photographic memory but never developed it.",
"category": "Word game"
}
Response examples (201)
Long way top school
[
{
"id": 33,
"joke": "He used to take his dog to school every day, but he finally had to stop. How come?",
"category": "School",
"thumbsUp": 3,
"dateAdded": "2017-07-12T20:12:33.001Z",
"punchline": "The dog got graduated.",
"thumbsDown": 3
}
]
[
{
"id": 42,
"joke": "What is the name to open the door?",
"category": "Classic",
"thumbsUp": 4,
"dateAdded": "1998-07-12T20:12:33.001Z",
"punchline": "Open your chakra",
"thumbsDown": 2
}
]