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
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.
Yes, you can specify this by setting your cache policies as described in the documentation.
You also have the option of using cloud code in parse.com. A background job can check whether the data has changed and if not can send you the desired response.
© 2022 - 2024 — McMap. All rights reserved.