Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Parse.com Cloud Code Have etag support?

Does Parse.com support the use of etags and if-none-match for Conditional GETs? I'm working with a third party API that requires this as a must, to limit API calls to their server. Im using Cloud Code as my backend sending data to a Cordova/ionic hybrid app. Thanks

like image 632
garrettmac Avatar asked Nov 03 '15 05:11

garrettmac


People also ask

Is parse still supported?

In 2014, Parse released a report detailing their support of over 500,000 applications. On January 28, 2016 Facebook announced that it would shut Parse down with all services ceasing operation on January 28, 2017.

What is ETag in Web API?

An entity tag, or ETag, is a mechanism that is provided by the HTTP protocol so that a browser client or a script can make conditional REST requests for optimistic updating or optimized retrieval of entities.

Where is ETag stored?

Approach C: caching the ETag. This is like approach B but ETag is stored in some cache middleware.


1 Answers

Yes depending on your definition of support. You have the ability to set arbitrary headers on the request which is all that is required. However, it appears that you will need to either store the values yourself somewhere in Parse, or simply use fixed values you believe to be incorrect. You can retrieve etag values from the response headers. The RFC can guide you to the correct values. Note that Cloud Code on the open sourced Parse Server appears to provide increased access to the underlying JS interpreter rather than being sandboxed so you can access other mechanisms that may be more friendly than Parse's own HTTP object.

like image 117
cacsar Avatar answered Oct 01 '22 04:10

cacsar