Does Parse.com Cloud Code have etag support?

Does Parse.com support the use of etags and if-none-match for conditional GETs? I work with a third-party API, which requires this as a must, to restrict API calls to my server. I use Cloud Code as my backend sending data to the Cordova / ionic hybrid app. Thanks

+8
ionic-framework etag cloud-code
source share
2 answers

Yes, depending on your definition of support. You have the option to set arbitrary headers in the request , which is all that is required. However, it seems you need to either store the values โ€‹โ€‹yourself somewhere in Parse, or just use fixed values, which in your opinion are incorrect. You can get etag values โ€‹โ€‹from response headers . RFC can lead you to the right values. Note that the cloud code on the open Parse Server provides enhanced access to the underlying JS interpreter, not the sandbox, so you can access other mechanisms that may be friendlier than Parse's own HTTP object.

+1
source share

Yes, you can specify this by setting cache policies as described in the documentation .

You also have the option to use the cloud code at parse.com. A background job can check if the data has changed and if you cannot send the response you want.

0
source share

All Articles