What is the X-REQUEST-ID http header?

前端 未结 4 1476
孤独总比滥情好
孤独总比滥情好 2020-12-12 11:17

I have already googled a lot this subject, read various articles about this header, its use in Heroku, and projects based on Django.

However, it\'s still all confuse

4条回答
  •  有刺的猬
    2020-12-12 11:54

    This request header can be used for syncrhonization. Let's say you've built a ToDo list that offers offline capability. Your user creates 3 items and each of them are given a unique UUID on the offline application. When network connectivity is available, the records are POSTed to the server and the corresponding IDs auto-generated from the database are returned. You can then replace the IDs in your app (e.g. "id" attribute of HTML "li" element).

提交回复
热议问题