dimanche 16 novembre 2014

How to build a restful url syntax

Defined as a model and its associations, I wish the http calls to follow best practices of restful. For example, if I make the call

I wish to run a call http defined as

If a call is then put on post with id 32 then the url of reference must be

So I want to avoid using the filter property as is the default for a get


Code:



/posts.php?filter=[{"property":"user_id","value":1}]

this is because the bees rest are already defined and I can not change them.

I would like to build a minimally invasive solution and reading on various forums the best way is to do an ovveride the method buildURL but was not able to retrieve all the data needed to build the final URL. Can anyone give me an example?


thanks






How to build a restful url syntax

Aucun commentaire:

Enregistrer un commentaire