Reputation: 230
I am trying to model the following REST call in MDriven
jQuery.ajax({
type: 'POST',
url: 'http://server.net/api/server/search.php',
data: {
'apikey': xxxxxx,
'apiversion': '3',
'action': "search",
'type':'near',
'lat':'59.91673',
'long': '10.74782',
'distance': '2000',
'limit': '10'
},
success: printJsonResponse,
dataType: 'json'
});
The ViewModel would as I understand it be as follows:
But it is hard to test if this is the "same" (and it doesn't work)
Upvotes: 1
Views: 59
Reputation: 2435
One way to see what is actually sent is to send your data to some echo service that just returns what it gets.
I think there must be REST services for this. I googled "Rest echo service" and got this for example: https://postman-echo.com/get?foo1=bar1&foo2=bar2
Try to send your request to https://postman-echo.com and then write out the result.
Upvotes: 0