Guide: How to make POST request in POSTMAN

  1. Make request POST
  2. take the same route like for getAll, in our example http://localhost:5555/api/v1/products
  3. go to "Body" tab & select "raw" option
  4. change from 'text' to "JSON" format
  5. make necessary object
    {
    "name": "Samsung",
    "price": 2700
    }
    OR in case when product collection connected (bound) with category collection
    {
    "name": "Samsung",
    "price": 2700,
    "category": "645b40cd4aaa8cdfd52bc245"
    }

    Make sure that in POSTMAN keys (name, price etc.) made in ""

  6. A) Request for file sending (ONLY FILE)
    • Create POST request to "http://localhost:5555/file"
    • Go to "body" tab
    • Choose "form-data"
    • In key filed add special filed > avatar > & in the same filed on right side choose from dropdown menu > file >
    • In Value filed take an image file
    B) Request for file sending (FILE + application/json)