Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

postman test save token

pm.test("Access token is available", function () {
    const csrf_token = pm.response.json().csrf_token;
    pm.expect(csrf_token).not.eq(undefined);
    
    // Guarda o "csrf_token" obtido 
    // (será utilizado pelas demais requisições)
    pm.collectionVariables.set("csrf_token", csrf_token);
});
 
PREVIOUS NEXT
Tagged: #postman #test #save #token
ADD COMMENT
Topic
Name
6+3 =