viezel / napp.alloy.adapter.restapi

RestAPI Sync Adapter for Titanium Alloy Framework
197 stars 102 forks source link

Proposal to add xhr method on config #30

Closed alexandrereyes closed 10 years ago

alexandrereyes commented 10 years ago

example:

exports.definition = { config : { "type" : "POST", "adapter" : { "type" : "restapi", "collection_name" : "produtos", "idAttribute" : "id" } } }

viezel commented 10 years ago

no no @alexandremblah. That is not right. The entire adapter is based on CRUD. So you will need to do GET, POST, PUT and DELETE. So it would not make sence to set the type.

/tasks (GET)
/tasks/1 (this could be GET, or if you update this particular task, then it would be a POST)

So its not the right place to do this.