Fetch a collection using a POST request?

mike picture mike · Jun 21, 2011 · Viewed 24.4k times · Source

I have managed to work with REST API's to fetch() data where the urls contain minimal parameters (and use GET).

How would one retrieve a collection through a POST request?

Answer

Arvid Janson picture Arvid Janson · Sep 28, 2011

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'});

For more parameters: http://api.jquery.com/jQuery.ajax/