Get a list of Products
GEThttps://dishes-rest-3132f998e75a.herokuapp.com/products
Security
This api use API KEY as an authentication method.
- Name: x-api-key
- In: header
Request Parameters
No parameters
Response
| Code | Type |
|---|---|
200 | Return a list of products. |
401 | Unauthorized. |
Example Usage
var headers = new Headers();
headers.append("x-api-key", "API_KEY");
var requestOptions = {
method: 'GET',
headers: headers,
redirect: 'follow'
};
fetch("https://dishes-rest-3132f998e75a.herokuapp.com/products", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));Example Success Response
products: [
{
"_id": "6580411187aade9854246759",
"name": "Acharuli Khachapuri",
"subName": "Acharuli Khachapuri, Acharuli, Khachapuri, აჭარული ხაჭაპური, აჭარილი, ხაჭაპური",
"description": "Acharuli Khachapuri description",
}
]Example Error Response
{
"message": "Unauthorized, invalid request"
}