date-poll-api/examples.md

27 lines
427 B
Markdown
Raw Normal View History

# API example
after having setup your project and database, and having a local server running you can rest these commands
```
POST
http://127.0.0.1:8000/api/v1/poll/98/vote
Content-Type:"pplication/json
{
"pseudo": "Mario Bros",
"email": "MarioBros@tktest.com",
"votes": [{
"choice_id": 287,
"value": "yes"
},
{
"choice_id": 288,
"value": "no"
},
{
"choice_id": 289,
"value": "maybe"
}]
}
```