REST API GET with empty value parameter

hi,

I'm trying to consume a REST API which requires parameter with empty value in URL in some cases.

It looks something like below (the underlined part).

~/apimethod?TARGETPARAM=&OTHERPARAM=VALUE


When sent from the "Consume REST API Method" test tab, the request is sent exactly as written above and it gives me correct response.

However, when it's sent from some Action, outsystems seems to omit the empty value parameter.

Log shows request sent was 

~/apimethod?OTHERPARAM=VALUE


I tried setting TARGETPARAM={InputParamter} and passing InputParamter a blank text, but obtained same result.


Is there any way to get around this?

I'm currently on version 10, soon moving to 11.

thanks in advance

Solution

Hi Sho,

Set the parameter's "Send Default Value" Property to True, and it should be sent always, even if empty. Note that for Integer Parameters, a "0" will be sent as that's an Integer's default value. But Text Parameters should be empty.

Solution

hi Kilian,

Yes, it worked!

Thanks for the help!

many thanks

You're most welcome. Happy coding!