---
# System prepended metadata

title: script
tags: [Postman]

---

---
title: script
tags: Postman
---
Document: https://learning.postman.com/docs/writing-scripts/script-references/test-examples/


## Pre-Request Script

### base url in collection
- URL: set environment viraible
- <collection> => Pre-Request Script

        pm.request.url = pm.environment.get('URL') + pm.request.url
   
https://github.com/postmanlabs/postman-app-support/issues/3418
    
        
## Tests

### set token synchronously
- TOKEN: set environment viraible
- <request> => Tests

        pm.environment.set("TOKEN",pm.response.json().token)