31
Views
8
Comments
Use %20 instead of + to encode spaces when submitting a form using GET method
Question

When I create the get request with query parameter that contains the space then it automatically encoded as a + and not as %20. If any of the values of my query parameters have spaces in them, they will be automatically URL encoded on execution of the query. I am using REST API to call odata request.

In OData a plus character is used for expansion of child records and is treated as a special character. Is there any way that outsystem does not change the %20 or space to + sign?

Thanks 

Rank: #506

Sanjay kumar wrote:

When I create the get request with query parameter that contains the space then it automatically encoded as a + and not as %20. If any of the values of my query parameters have spaces in them, they will be automatically URL encoded on execution of the query. I am using REST API to call odata request.

In OData a plus character is used for expansion of child records and is treated as a special character. Is there any way that outsystem does not change the %20 or space to + sign?

Thanks 

Hi,

At first, I think a + sign should be %2B, not %20

Secondly, with REST api, OutSystems provides you the "On Before Request", you can implement things to prevent the conversion here

Hope this help

 

Rank: #1148

Hello!

Did a satisfactory solution ever get found for this, as I am encountered them same issue.

In the "OnBeforeRequest" event, I translated the "space" characters to "%20", but when I look in the Integration Log in Service Center, I can see that OutSystems was still using "+" in the request it actually sent.