question

hemanamani avatar image
hemanamani asked ericnute edited

iTest is substituting '%5B' for '[' in REST request url

My REST request URL contains few special symbols like ‘[]’. when I add the parameter having ‘[]’ symbol to the URL, ‘%5B’ is being substituted instead of ‘[]’ PFA How to use ‘[]’ in my request url? ![alt text][1] [1]: /storage/temp/3697-rest_request_img.png
iTestrest
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

hemanamani avatar image
hemanamani answered hemanamani edited
I tried to solve this by manually adding a GET step giving the REST request URL containing special symbols but still request is not being sent. and the below error is shown corresponding to the step in Test case: "Invalid Substitution in field: Unknown command 0" Basically my URL is of below format: http://serverIp/action?username=value&password=value&dnode[0].description=value&dnode[0].name=value Where dnode[0].desc , dnode[0].name are parameters.
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

sai_kiran avatar image
sai_kiran answered sai_kiran edited
The encoding will changes requested URL for all special symbols. For example: [ = %5B ] = %5D % = %25 and so on. This is called percent encoding and is used in encoding special characters in the url parameter values. Please let us know if you are facing any issues.
1 comment
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

hemanamani avatar image hemanamani commented ·
Yes.. Request is being sent with these encoded characters instead of actual characters i.e. [, ] and resulting in some Exceptions.. Is there anyway to send request with actual characters instead of encoded characters?
0 Likes 0 ·