0

I am trying to call a webservice from Postman client and while doing this I am passing a value which has '#' in it. Example:

test = "43543#324#435"

But when I enter this value and click somewhere else it will remove all characters from first '#' including '#'. So the parameter will become:

test = "43543"

What should I do so that I can pass a parameter with '#' in it?

Note: 'Postman' is a Google Chrome add-in to test Rest webservices.

Madhusudan
  • 4,637
  • 12
  • 55
  • 86
  • 1
    '#' has a [different meaning in url](http://stackoverflow.com/questions/8192742/what-is-the-meaning-of-in-url-and-how-can-i-use-that) – Suraj Rao Apr 04 '17 at 11:39

4 Answers4

2

You should not use # in your URL parameters.

You can find out why in this answer here: Characters allowed in GET parameter

Community
  • 1
  • 1
Sergej Lopatkin
  • 1,071
  • 9
  • 11
1

Not use # in URL so use encode of # is %23 and replace #. for example show in below.

test = "43543%23324%23435"
Keyur Bhanderi
  • 1,524
  • 1
  • 11
  • 17
1

I got the solution.

As some special characters are not allowed in URL, so we need to encode them. For this, in bulk edit mode for key-value pair, select value which contains special characters and right click. Select 'EncodeURIComponenet' and send request. It will work :)

Madhusudan
  • 4,637
  • 12
  • 55
  • 86
0

open "Pre-request Script" tab , and put that:

pm.request.url.query.each(param => {param.value = encodeURIComponent(param.value)})