Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,8 @@ scripts:
if (json_response && json_response.token) {
cv.set("customer_token", json_response.token);
}

// Requests that address the customer by id use {{customer_id}}; nothing set it.
cv.set("customer_id", json_response.id);
language: text/javascript
order: 1000
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,12 @@ body:
"description": "Example storefront product",
"price": 1000
}
order: 3000
scripts:
- type: afterResponse
code: |
// Retrieve and Update Product address {{product_id}}; nothing set it.
var json_response = pm.response.json();
let cv = pm.environment;
cv.set("product_id", json_response.id);
language: text/javascript
order: 2000
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ url: "{{base_url}}/{{api_prefix}}/{{namespace}}/products/{id}"
method: GET
pathVariables:
id: ""
order: 2000
order: 3000
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,12 @@ $kind: http-request
description: About Store
url: "{{base_url}}/{{api_prefix}}/{{namespace}}/about"
method: GET
scripts:
- type: afterResponse
code: |
// Lookup Store addresses {{store_id}}; nothing set it.
var json_response = pm.response.json();
let cv = pm.environment;
cv.set("store_id", json_response.id);
language: text/javascript
order: 2000
Loading