定期检查新数据的 api 的正确方法? [英] Proper way to periodically check an api for new data?

查看:32
本文介绍了定期检查新数据的 api 的正确方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否有适当的方法可以定期检查 api 以获取更新的数据.我正在寻找比带有延迟计时器的 while 循环更有效的解决方案.

I was wondering if there is a proper way to periodically check an api for updated data. I'm looking for a more efficient solution than a while loop with a delay timer.

是否有任何标准标题可以检查以查看内容是否已更新(为了跳过将以前的结果与新的结果进行比较?)

Are there any standard headers that can be checked to see if content was updated (in order to skip comparing previous results to the new ones?)

附加说明我目前使用 python,但这是一个关于所有编程语言的广泛问题.

Additional notes I using python at the moment but this is a broad question regarding all programming languages.

推荐答案

你可能想看看 条件请求规范缓存规范.

这篇关于定期检查新数据的 api 的正确方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆