mercredi 22 avril 2015

in REST what method to use for the sync operation

Synchronizing data once user gets online involves both Insert and Update (Upsert) and I'm sending both kinds of records in a single request (array in the body) and then server iterates through records to determine insert or update.

lastModified date for each record is kept on the client side and the records greater than lastSyncDate are retrieved and sent to the server.

My question is whether to use POST or PUT?

Also how a response (JSON) should like in the body?

Aucun commentaire:

Enregistrer un commentaire