Convention for HTTP response header to notify clients of deprecated API

前端 未结 6 665
逝去的感伤
逝去的感伤 2020-12-23 16:00

I\'m upgrading our REST API endpoints and I want to notify clients when they are calling the to-be-deprecated endpoint.
What header should I use in the response with a m

6条回答
  •  旧时难觅i
    2020-12-23 16:20

    There is an HTTP header field called Sunset which is intended to signal an upcoming deprecation of a resource. https://tools.ietf.org/html/draft-wilde-sunset-header is in the last stages of becoming an RFC. Ideally, your API should document that it is going to use Sunset, so that clients can look for it and act upon it, if they want to.

提交回复
热议问题