REST comma separated parameter dropped

REST comma separated parameter dropped

  

I am trying to consume the Google Reverse-Geocoding API using the following URL:

maps.googleapis.com/maps/api/geocode/json?latlng={Latitude},{Longitude}

Setting this URL automatically creates "Latitude" and "Longitude" parameters in my REST Action.  Pressing the TEST button after setting sample values works perfectly and returns the expected data.

However, when I try to call the REST service from my application, it returns ZERO_RESULTS.  After much confusion, I finally logged the REST call data to find the longitude parameter had been dropped from the URL.

HTTP Trace:GET https://maps.googleapis.com/maps/api/geocode/json?latlng=-26.1147 HTTP/1.1


This is probably due to the OS logic which tries to eliminate default parameters in the call and expects {Longitude} to have its own xxx= parameter.  (Note that the API has one "latlng=" parameter made up of the two values separated by a comma).  This happens on both P9 and P10.


The workaround I found was to create a single parameter called "LatLon" and concatenate the Latitude and Longitude with a comma in the middle.



Solution

Hi Lester,


That is indeed a know issue and it's still in backlog to be fixed.

The workaround that you found is the recommended one.


Regards,
João Rosado

Solution