2
基本上,我需要我的移动应用程序(它是用Trigger构建的)发送Post请求到远程服务器。具体来说,应用程序生成GPS坐标和时间戳,并将数据发送到服务器(使用Ruby on Rails构建),该服务器将数据存储并存储。我正在使用Zepto库发送它。我如何去实现这一目标?用Trigger.io发送的移动应用程序的发送请求
<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");
);
这是实际发送请求的代码。我不相信这个问题在别处。
看起来你也使用地理定位?请参阅http://docs.trigger.io/en/v1.3/modules/geolocation.html –