postman-app-support icon indicating copy to clipboard operation
postman-app-support copied to clipboard

Path variables are not encoded automatically

Open jasonycw opened this issue 1 year ago • 1 comments

Is there an existing issue for this?

  • [X] I have searched the tracker for existing similar issues and I know that duplicates will be closed

Describe the Issue

I have set Encode URL automatically to on but the path variables are still not encoded image Only query params are encoded properly

Steps To Reproduce

  1. Create a new request
  2. Add a path variables
  3. Type something that needs to be encoded for the path variables

Screenshots or Videos

image Result in cURL

curl --location 'test.api/qwert#2345?world=asdf%231234'

expected cURL

curl --location 'test.api/qwert%232345?world=asdf%231234'

Operating System

macOS

Postman Version

11.2.27

Postman Platform

Both

User Account Type

Signed In User

Additional Context?

No response

jasonycw avatar Jul 03 '24 06:07 jasonycw

Can confirm the same, path variables not encoded for v11.4.0

artem-emelin avatar Jul 19 '24 13:07 artem-emelin

I have the same problem on v11.52.5 on macOS Sequoia 15.5.

I have a request with a path variable named query like this <request_url>?query=field=value and the = symbol between field and value is not encoded as %3A, which causes an error during the request. If i replaced variable value with field%3Avalue, it works.

I am attaching to this comment a json export of a test allowing the anomaly to be reproduced.

Tests.postman_collection.json

And this is what we see in the postman console: Image

joelroyer avatar Jul 10 '25 09:07 joelroyer