12

I have the following format in URL.

http://username:password@test.nabin.com/some/url

Here password is something like qDTA*$X)ME/74. When I directly use this password in URL, then the postman does not respond. How should I proceed testing this url?

(In the image the response container is plain white without any error. This indicates, the API was never hit) enter image description here

Nabin
  • 11,216
  • 8
  • 63
  • 98

2 Answers2

30

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

https://learning.postman.com/docs/postman/sending-api-requests/requests/#sending-parameters

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.”

Danny Dainton
  • 23,069
  • 6
  • 67
  • 80
1

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.

Nabin
  • 11,216
  • 8
  • 63
  • 98
  • 1
    In the newer versions of Postman you can select a part of the text in the URL, right click and get an option to encode that value. – Danny Dainton Apr 22 '18 at 06:36
  • For a very long time - The version in that image is years old. Grab the native client app for your OS - packed full of features that you wouldn’t ever see in the one you have. – Danny Dainton Apr 22 '18 at 08:57