Using env var with url but fails with parameterization?

This may be specific to the endpoint being used but
Lets say I have a pre request script that makes the following

pm.environment.set('randomNumber', number);
pm.environment.set('table',tableName);

Then in the request URL its a DEL with the following url as example.
www.domain.com/table({{tableName}},{{number}}).
Assuming this is how the request wants to be formatted then it should work but in my issue I can see that the URL is constructed as such when the request is sent, but fails when using parameterization.

If I take the same request that gets output in the console from the parameterization and use it has a hardcoded url it passes.

Any ideas or help?
This is the endpoint being used - Delete Entity (REST API) - Azure Storage | Microsoft Docs

Hi @dbiles123456789

Try removing the rounded brackets and comma from the URL path.

For example;
www.domain.com/table{{tableName}}{{number}}
or
www.domain.com/table/{{tableName}}/{{number}}

If you specifically need these in the URL then they would most likely need URL encoding;

www.domain.com%2Ftable%28{{tableName}}%2C{{number}}%29

Sadly, Azure will not allow that to work. That format would make much more sense but…

Again, oddly enough, if I take the entire url that prints to the postman console and use the hardcoded values it works.

I’m not sure if this is on the Azure side or on the postman side

could you share some screenshots? would help visualise what you mean.

1 Like

If you notice the order of the console output here

  1. I am able to create a row in a table
  2. When I try to delete said row I get a 403 - again this url is dynamical generated in the pre-request script
  3. If I copy the generated url and paste in the address bar of postman for the delete request it responds with a 204

Very puzzling as to why a url generated within postman would fail but the same generated url works if used directly with hardcoded values

I wonder if it could be related to this…