Skip to content

Instantly share code, notes, and snippets.

@andhikayuana
Last active December 27, 2018 08:57
Show Gist options
  • Save andhikayuana/be0345d635ca6f0eb22e2705d485c688 to your computer and use it in GitHub Desktop.
Save andhikayuana/be0345d635ca6f0eb22e2705d485c688 to your computer and use it in GitHub Desktop.
postman collection runner article
pm.globals.get("variable_key"); //untuk mengambil variabel global
pm.variables.get("variable_key"); //mengambil variabel lokal
pm.environment.set("variable_key", "variable_value"); //setting environment variabel
pm.globals.set("variable_key", "variable_value"); //setting variabel global
pm.environment.unset("variable_key"); //hapus environment variabel
pm.globals.unset("variable_key"); //hapus variabel global
// melakukan request ke suatu API
pm.sendRequest("https://postman-echo.com/get", function (err, response) {
console.log(response.json());
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment