Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2ac093a
commit 3742e22
Showing
1 changed file
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
{ | ||
"info": { | ||
"name": "Sample Postman Collection", | ||
"schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json", | ||
"description": "A sample collection to demonstrate collections as a set of related requests" | ||
}, | ||
|
||
"item": [{ | ||
"name": "A simple GET request", | ||
"event": [{ | ||
"listen": "test", | ||
"script": { | ||
"type": "text/javascript", | ||
"exec": [ | ||
"pm.test('expect response be 200', function () {", | ||
" pm.response.to.be.ok", | ||
"})", | ||
"pm.test('expect response json contain args', function () {", | ||
" pm.expect(pm.response.json().args).to.have.property('source')", | ||
" .and.equal('newman-sample-github-collection')", | ||
"})" | ||
] | ||
} | ||
}], | ||
"request": { | ||
"url": "https://postman-echo.com/get?source=newman-sample-github-collection", | ||
"method": "GET" | ||
} | ||
}, { | ||
"name": "A simple POST request", | ||
"request": { | ||
"url": "https://postman-echo.com/post", | ||
"method": "POST", | ||
"header": [{ | ||
"key": "Content-Type", | ||
"value": "text/plain" | ||
}], | ||
"body": { | ||
"mode": "raw", | ||
"raw": "Duis posuere augue vel cursus pharetra. In luctus a ex nec pretium..." | ||
} | ||
} | ||
}, { | ||
"name": "A simple POST request with JSON body", | ||
"request": { | ||
"url": "https://postman-echo.com/post", | ||
"method": "POST", | ||
"header": [{ | ||
"key": "Content-Type", | ||
"value": "application/json" | ||
}], | ||
"body": { | ||
"mode": "raw", | ||
"raw": "{\"text\":\"Duis posuere augue vel cursus pharetra. In luctus a ex nec pretium...\"}" | ||
} | ||
} | ||
}] | ||
} |