Meteor HTTP请求结构化(Meteor HTTP request structuring)
我正在玩meteor中的一些API,我正在尝试使用HTTP包来访问它。 他们给出的示例将请求格式化为Curl命令,如下所示:
curl -X POST https://api.locu.com/v2/venue/search/ -d '{"fields":["name","menu_items","location","categories","description"],"menu_item_queries":[{"price":{"$ge":15},"name":"steak"}],"venue_queries":[{"location":{"locality":"San Francisco"}}],"api_key":"YOUR_API_KEY"}'
如何将其转换为HTTP.call()? 我是否使用文档中列出的数据参数? PARAMS? 内容? 到目前为止我尝试过的变化都没有奏效。
I am playing around with some API in meteor and am trying to use the HTTP package to access it. The example they give formats the request as a Curl command like this :
curl -X POST https://api.locu.com/v2/venue/search/ -d '{"fields":["name","menu_items","location","categories","description"],"menu_item_queries":[{"price":{"$ge":15},"name":"steak"}],"venue_queries":[{"location":{"locality":"San Francisco"}}],"api_key":"YOUR_API_KEY"}'
How do I convert this into an HTTP.call()? Do I use the data argument I see listed in the docs? Params? Content? The variations I have tried so far haven't worked.
原文:https://stackoverflow.com/questions/30826441
最满意答案
It is not a problem with your code....
I had the same problem and was able to fix it with the help of a similar stackoverflow post.
Solution
Force stopping this application will make the permission dialog allow buttons to work again.
相关问答
更多-
你需要在你的fb-login-button class div中加入“data-perms”属性。 这就是我的意思:这里有一个链接到Facebook的文档页面,将告诉你所有关于它的: https : //developers.facebook.com/docs/guides/web/ 我刚粘贴的代码大约是页面的 ...
-
尝试这个: $('#dialog-form').dialog({ ... buttons : {...}, open : function() { $('#dialog-form') .dialog('widget') .find('div.ui-dialog-buttonpane div.ui-dialog-buttonset button') .eq(0) ...
-
等待DOM准备好。 将.dialog()代码粘贴到$(document).ready()或$()块中 Wait for the DOM to be ready. Stick your .dialog() code in a $(document).ready() or $() block
-
我发现问题是什么: AudioDispatcher dispatcher = AudioDispatcherFactory.fromDefaultMicrophone(22050,1024,0); 需要在请求权限之后调用,而不是之前。 I found out what the issue was: AudioDispatcher dispatcher = AudioDispatcherFactory.fromDefaultMicrophone(22050,1024,0); needs to be cal ...
-
试试这个简单的android权限库。 它使开发人员的生活更加轻松 只需在gradle中包含以下依赖项即可 dependencies { compile 'com.vistrav:ask:1.2' } 并在您的活动中使用以下代码段来请求许可。 Ask.on(context) .forPermissions(Manifest.permission.ACCESS_COARSE_LOCATION , Manifest.perm ...
-
这不是你的代码的问题.... 我有同样的问题,并能够在类似stackoverflow帖子的帮助下修复它。 解 强制停止此应用程序将使权限对话框允许按钮再次工作。 It is not a problem with your code.... I had the same problem and was able to fix it with the help of a similar stackoverflow post. Solution Force stopping this application wi ...
-
您可能使用新的 ,尝试更改您的Facebook应用程序设置。 You probably use the new one, try to change your facebook app settings.
-
应使用以下命令调用.dialog小部件的open方法: $("#dialog_frame").dialog('open'); (而不是$("#dialog_frame").open() - 这行代码不会在你的javascript控制台中引发错误吗?) The open method of the .dialog widget should be invoked using : $("#dialog_frame").dialog('open'); (instead of $("#dialog_frame" ...
-
在对话框类中重写虚函数“ virtual void closeEvent(QCloseEvent * e) ”。 代码注释将详细解释。 Dialog::Dialog(QWidget *parent) :QDialog(parent), ui(new Ui::Dialog){ ui->setupUi(this); } Dialog::~Dialog(){ delete ui; } //SLOT void Dialog::fnShow(){ //Show the dialog t ...
-
您不能将多个权限合并为一个。 即使您将权限作为数组传递,也会为请求的每个权限设置单独的对话框。 You can't club multiple permissions into one. There will be a separate dialog for each permission that is requested even you are passing permission as an array.