Forum Discussion

ashetty's avatar
ashetty
New Contributor
11 years ago

How to encode the parameter value in a REST request in Ready API?

I have 2 REST requests - say Request 1 and Request 2.



Response for the Request 1 returns a 'device ID' that starts with '#' (say #94308379-F827-56A9...). I need to send the 'device ID' as a parameter for the Request 2, which I am doing successfully with the Property Transfer using XPath.



When i execute the Request 2, parameter 'device ID' is not getting encoded. That is, still sent as #94308379-F827-56A9... I am expecting it to be '%2394308379-F827-56A9..'. Can you please help me how to fix this issue?



Additional Info:

1. I tried checking and unchecking the Preferences -> 'Pre-encoded Endpoints' option and it didn't work.

2. I tried checking and unchecking the 'Disable Encoding' checkbox for the parameter and it didnt work as well. Please find the screenshots of Preferences and Requests attached.



Image and video hosting by TinyPic>



Image and video hosting by TinyPic>

1 Reply

  • Hello,

     

    Uncheck File -> Prefernces -> HTTP Settings, Pre-encoded endpoints and save the preferences (File -> save preferences).  Then sending the request should encode the endpoint i.e the # character.

     

    parameter_to_be_encoded.png

     

    encoded_parameter.png