dimanche 19 juin 2016

How do we PATCH an existing REST API in Ember

If I have an existing REST API running locally at:

http://localhost:8000/v1/metadata

with JSON Data

{
   name : Mike
   eating: false
}

and I would like to PATCH a specific parameter with ember, say eating, to make it true/false with a click of a button, how would I go about doing that ?

I found ember supports REST API with RESTadapter, but the tutorials out there are very confusing and there are not much documentation on it

All I have right now in app.js is:

App.ApplicationAdapter = DS.RESTAdapter.extend({
    host: : "http://localhost:8000"
    namespace: "api/v1/metadata"
});

any simple example or direction would help at this point




Aucun commentaire:

Enregistrer un commentaire