Can you still not escape variable substitution (double brackets)?

Say you want to create a request with the postman-api using the url {{base_url}}/myEndpoint which either points to production or staging depending on your environment.

Can’t you escape the curly braces so that the created request points to {{base_url}} instead of pointing to the substituted value?

I found some 2 years old topics on this where they landed on this being impossible—asking again, just in case this has been made possible since.

Hi @research-administrat

Not sure I understand your question…

Why would you want the request to point to {{base_url}} and a plain text value?

staging: {{base_url}} = https://my-staging-server.com
prod: {{base_url}} = https://my-production-server.com

I want the request created by the postman-api PUT in the attached screenshot to create a request in the Auto-collection, where you can switch between staging and prod in the created Request.

If I send the payload in the attached screenshot however, the created request will point to the substituted value of {{base_url}}, and switching environments won’t affect the URL the created request points to.

Did that make sense?