使用 POST 请求获取集合? [英] Fetch a collection using a POST request?
本文介绍了使用 POST 请求获取集合?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我设法使用 REST API 来fetch()
数据,其中 url 包含最少的参数(并使用 GET
).
I have managed to work with REST API's to fetch()
data where the urls contain minimal parameters (and use GET
).
如何通过 POST
请求检索集合?
How would one retrieve a collection through a POST
request?
推荐答案
另外注意 fetch 支持 Jquery.ajax 参数,所以你可以很容易地在调用中设置 type = post.
Also note that fetch supports Jquery.ajax parameters, so you can easily set type = post in the call.
Messages.fetch({data: {api_key: 'secretkey'}, type: 'POST'});
更多参数:http://api.jquery.com/jQuery.ajax/
这篇关于使用 POST 请求获取集合?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文