Skip to content

Instantly share code, notes, and snippets.

View kingreatwill's full-sized avatar
🌴
On vacation

wcoder.com kingreatwill

🌴
On vacation
View GitHub Profile
@gghughunishvili
gghughunishvili / example.md
Last active October 22, 2024 19:13 — forked from sdnts/example.md
Postman pm.sendRequest example

To send a request via the sandbox, you can use pm.sendRequest.

pm.test("Status code is 200", function () {
    pm.sendRequest('https://postman-echo.com/get', function (err, res) {
        pm.expect(err).to.not.be.ok;
        pm.expect(res).to.have.property('code', 200);
        pm.expect(res).to.have.property('status', 'OK');
    });
});