Jeremy5835883
Posts: 0
Joined: Wed May 08, 2013 12:02 pm

passing a float to a rest api call

I want to test a rest service call that requires a float as one of the inputs. It seems it is always being sent as a string. how can i specify the type of that data to be sent. below is what the request should look like..

"data":
{
"LatLon":{
"__type":"GeoPoint",
"latitude":40.934784,
"longitude":-73.12912
}
}

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

passing a float to a rest api call

On page mapping for the service, run this:
code
return number;
/code

Jeremy5835883
Posts: 0
Joined: Wed May 08, 2013 12:02 pm

passing a float to a rest api call

I am trying to run this using the test functionality in the view for the service. Where would I put the "return number" statement?

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

passing a float to a rest api call

Won't work from Test view yet.. need to run from page.

Jeremy5835883
Posts: 0
Joined: Wed May 08, 2013 12:02 pm

passing a float to a rest api call

thanks but where would i run that statement on the mapping page? a screenshot perhaps?

Jeremy5835883
Posts: 0
Joined: Wed May 08, 2013 12:02 pm

passing a float to a rest api call

thanks

Return to “Issues”