Postman | WindowsSkip to main content

Postman | Windows

– JSON body: Body → raw → JSON → enter:

// Parse JSON body let jsonData = pm.response.json(); pm.test("Has title", () => pm.expect(jsonData).to.have.property("title"); ); postman windows

– for file uploads or simple forms 6. Testing & Assertions (Basic Scripts) In the Tests tab (JavaScript): – JSON body: Body → raw → JSON

– similar to POST

// Set environment variable pm.environment.set("lastId", jsonData.id); "title": "Postman Guide"

"title": "Postman Guide", "body": "For Windows users", "userId": 1