8000 Adding postman collection · venkata-qa/rest-assured-tutorial@d20bfe3 · GitHub
[go: up one dir, main page]

Skip to content

Commit d20bfe3

Browse files
committed
Adding postman collection
1 parent c27b1e1 commit d20bfe3

File tree

2 files changed

+107
-264
lines changed

2 files changed

+107
-264
lines changed

OnlyFullStack Employee Collection.postman_collection.json

Lines changed: 0 additions & 264 deletions
This file was deleted.

OnlyFullStack_Employee.postman_collection.json

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,113 @@
152152
}
153153
},
154154
"response": []
155+
},
156+
{
157+
"name": "OAuth Token Request",
158+
"event": [
159+
{
160+
"listen": "test",
161+
"script": {
162+
"id": "3dbd6464-f5e2-4d6f-b574-e2d80514525f",
163+
"exec": [
164+
"var jsonData = JSON.parse(responseBody);",
165+
"postman.setEnvironmentVariable(\"access_token\", jsonData.access_token);"
166+
],
167+
"type": "text/javascript"
168+
}
169+
}
170+
],
171+
"request": {
172+
"auth": {
173+
"type": "basic",
174+
"basic": [
175+
{
176+
"key": "username",
177+
"value": "rest-assured",
178+
"type": "string"
179+
},
180+
{
181+
"key": "password",
182+
"value": "password",
183+
"type": "string"
184+
}
185+
]
186+
},
187+
"method": "POST",
188+
"header": [
189+
{
190+
"key": "Content-Type",
191+
"name": "Content-Type",
192+
"value": "application/x-www-form-urlencoded",
193+
"type": "text"
194+
}
195+
],
196+
"body": {
197+
"mode": "urlencoded",
198+
"urlencoded": [
199+
{
200+
"key": "username",
201+
"value": "onlyfullstack",
202+
"type": "text"
203+
},
204+
{
205+
"key": "password",
206+
"value": "secret",
207+
"type": "text"
208+
},
209+
{
210+
"key": "grant_type",
211+
"value": "password",
212+
"type": "text"
213+
}
214+
]
215+
},
216+
"url": {
217+
"raw": "localhost:8088/oauth/token",
218+
"host": [
219+
"localhost"
220+
],
221+
"port": "8088",
222+
"path" 10000 : [
223+
"oauth",
224+
"token"
225+
]
226+
}
227+
},
228+
"response": []
229+
},
230+
{
231+
"name": "OAuth Secured Get call",
232+
"request": {
233+
"auth": {
234+
"type": "bearer",
235+
"bearer": [
236+
{
237+
"key": "token",
238+
"value": "{{access_token}}",
239+
"type": "string"
240+
}
241+
]
242+
},
243+
"method": "GET",
244+
"header": [],
245+
"body": {
246+
"mode": "raw",
247+
"raw": ""
248+
},
249+
"url": {
250+
"raw": "localhost:8088/students/2",
251+
"host": [
252+
"localhost"
253+
],
254+
"port": "8088",
255+
"path": [
256+
"students",
257+
"2"
258+
]
259+
}
260+
},
261+
"response": []
155262
}
156263
]
157264
}

0 commit comments

Comments
 (0)
0