How to handle URL with special characters present in password in Postman?

时光怂恿深爱的人放手 提交于 2019-12-05 10:54:05

You can manually encode parts of the URL within the application. These are the docs from version 6.

https://www.getpostman.com/docs/v6/postman/sending_api_requests/requests

Under the URL section:

“Note: Parameters you enter in the URL bar or in the data editor will not automatically be URL-encoded. Right click a piece of selected text, and select “EncodeURIComponent” to manually encode the parameter value.”

For the time being, I will share how I handled this. I used two lines of python script for quoting the password and using the output in the postman.

>>> from urllib.parse import quote_plus
>>> quote_plus('qDTA*$X)ME/74')
'qDTA%2A%24X%29ME%2F74'

Then I simply used this quoted password to construct the following new URL:

http://username:qDTA%2A%24X%29ME%2F74@test.nabin.com/some/url

Hopefully someone comes here and answers how we should do it properly.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!