Skip to content

Commit

Permalink
update postman collection
Browse files Browse the repository at this point in the history
- move file upload endpoints to a folder
- add products route CRUD to it's folder
  • Loading branch information
unicornist committed Jun 5, 2021
1 parent 8da9d53 commit b93bfb3
Showing 1 changed file with 112 additions and 59 deletions.
171 changes: 112 additions & 59 deletions Maktab47 Exercise Upload.postman_collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,72 +6,125 @@
},
"item": [
{
"name": "Upload",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "image",
"type": "file",
"src": "/C:/Users/Babak/Desktop/Desktop/thumbnail.jpg"
"name": "Test Upload",
"item": [
{
"name": "Upload",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "image",
"type": "file",
"src": "/C:/Users/Babak/Desktop/Desktop/thumbnail.jpg"
}
]
},
"url": {
"raw": "{{SERVER}}/upload",
"host": [
"{{SERVER}}"
],
"path": [
"upload"
]
}
]
},
"response": []
},
"url": {
"raw": "{{SERVER}}/upload",
"host": [
"{{SERVER}}"
],
"path": [
"upload"
]
}
},
"response": []
},
{
"name": "Download a File",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{SERVER}}/files/:file_id",
"host": [
"{{SERVER}}"
],
"path": [
"files",
":file_id"
],
"variable": [
{
"key": "file_id",
"value": ""
{
"name": "List of Files",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{SERVER}}/files",
"host": [
"{{SERVER}}"
],
"path": [
"files"
]
}
},
"response": []
},
{
"name": "Download a File",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{SERVER}}/files/:file_id",
"host": [
"{{SERVER}}"
],
"path": [
"files",
":file_id"
],
"variable": [
{
"key": "file_id",
"value": ""
}
]
}
]
},
"response": []
}
},
"response": []
]
},
{
"name": "List of Files",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{SERVER}}/files",
"host": [
"{{SERVER}}"
],
"path": [
"files"
]
"name": "Products",
"item": [
{
"name": "Create",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"name\": \"surface pro laptop\",\r\n \"brand\": \"microsoft\",\r\n \"image\": \"/files/65ddd8b1bbce4d8396b62611147fa1d6\",\r\n \"price\": \"1500\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{SERVER}}/products",
"host": [
"{{SERVER}}"
],
"path": [
"products"
]
}
},
"response": []
},
{
"name": "List",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{SERVER}}/products",
"host": [
"{{SERVER}}"
],
"path": [
"products"
]
}
},
"response": []
}
},
"response": []
]
}
],
"event": [
Expand Down

0 comments on commit b93bfb3

Please sign in to comment.