Essentially, I need my mobile app (created with Trigger) to send a Post request to a remote server. The app generates GPS coordinates and timestamps, then sends this data to a server (built using Ruby on Rails) for storage. I am utilizing the Zepto library for sending purposes. How should I approach this task?
<head> <script type="text/javascript" src="/js/lib/zepto.js"></script></head>
$.post(
url: "http://www.example.com",
data: {
latitude: position.coords.latitude;
longitude: position.coords.longitude;
timestamp: new Date().getTime();},
success: alert("Report Successful");
);
The above code handles the request transmission itself. It seems that the issue is not stemming from elsewhere.