MastersAcademy / frontend-course-2021

Репозиторій з курсу «Advanced Front-end» проекту Masters Academy
MIT License
5 stars 29 forks source link

Homework 12 - HTTP Client #263

Open TArch64 opened 2 years ago

TArch64 commented 2 years ago

Deadline

First of all

  1. Get the latest updates from Academy's repo by instruction;

  2. To your homework folder add a folder named 12-http

  3. Add your files into this folder:

homeworks/elon.musk_spacex2021/12-http

Task:

Create ToDo App that meets follow requirements:

  1. You able to choose any design that you like but it should look nice
  2. App should be responsive (mobile & tablet & desktop)
  3. App should allow to add new todo
  4. App should allow to change text of todo or isDone status
  5. App should allow to delete todo

As back-end you should use this one https://ma-http-homework.herokuapp.com.

To login make POST request to /sign-in with username & password params in body. Login form is advanced task so you can just get token from api ad hardcode it in your code

# Example of cURL
curl --request POST --url https://ma-http-homework.herokuapp.com/sign-in --header 'Content-Type: application/json' --data '{"username": "<your-username-here>","password": "<your-password-here>"}'

Avaialble endpoints:

# get list of todo
GET /secure/todos

# create new todo
POST /secure/todos
body format { "text": "<your-todo-text-here>" }

# Update todo
PATCH /secure/todos/<todo-id-here>
<todo-id-here> insert here id of todo
body format { "text": "<your-todo-text-here>" } or { "isDone": true/false }

# Delete todo
DELETE /secure/todos/<todo-id-here>
<todo-id-here> insert here id of todo

Advanced Task: