Skip to content

Latest commit

 

History

History
50 lines (36 loc) · 2.02 KB

README.md

File metadata and controls

50 lines (36 loc) · 2.02 KB

RESTful-Server

To Get Started

$ git clone https://github.com/YiiChoong/RESTful-Server.git
$ cd restAPI
$ py -m venv venv
$ ./venv/Scripts/activate
$ pip install -r requirements.txt
$ py manage.py createsuperuser
$ py manage.py migrate
$ py manage.py runserver

Copy Server Link

http://127.0.0.1:8000/

Download Postman

https://www.postman.com/downloads/?utm_source=postman-home

  • Open a new workspace and paste the server link image

  • Go to Body -> change method to POST -> select form-data -> enter username and password image

  • Set Authorazation type to OAuth 2.0 image

  • Enter the token to the Header image

Path: /cars   Method: GET

image

Path: /cars/:id   Method: GET

image

Path: /cars/:id   Method: POST

  • Go to Body -> raw -> change to JSON -> create the object and Send image

Path: /cars/:id   Method: PUT

  • Go to Body -> raw -> change to JSON -> paste the object, make changes and Send image

Path: /cars/:id   Method: DELETE

image