Skip to content

Instantly share code, notes, and snippets.

View liamwye's full-sized avatar

Liam Wye liamwye

View GitHub Profile
@liamwye
liamwye / postman_prereq_pathvariables.js
Created December 5, 2022 11:21
Code snippet to save Postman path variables as local variables. These variables can then be consumed in a request body or test.
/**
* Store path variables in a local variable, <collection variable: $pathVariablePrefix><path variable name>.
*/
// Get all path variables for use in the request body.
let pathVariables = pm.request.url.variables.all();
if (pathVariables.length > 0) {
let pathVariablePrefix = pm.collectionVariables.get('$pathVariablePrefix');
@liamwye
liamwye / settings.json
Created September 15, 2021 10:45
VSCode settings for PHP
{
"workbench.iconTheme": "material-icon-theme",
"editor.fontSize": 14,
"breadcrumbs.enabled": true,
"css.validate": true,
"diffEditor.ignoreTrimWhitespace": false,
"editor.tabSize": 2,
"editor.autoIndent": "full",
"editor.insertSpaces": true,