✅ REST API: GET, POST, UPDATE, DELETE
✅ Test in POSTMAN
✅ Connect Frontend with React Server
✅ Input value from React, Store it in Django
- postman 사용시 desktop version download 후 진행
- cloud ver 진행 시, get 요청 에러
- POST 요청 시, param에 데이터 넣는 것이 아닌, Body에 데이터 입력 (in POSTMAN)
>>> terminal) pip install django-cors-headers
# settings.py
INSTALLED_APPS = [
...
'corsheaders', # 추가
]
# 추가
CORS_ORIGIN_WHITELIST = ['http://localhost:3000']
MIDDLEWARE = [
'corsheaders.middleware.CorsMiddleware', # 추가
'django.middleware.common.CommonMiddleware', # 추가
...
]