A.data:HTTP 響應的數(shù)字狀態(tài)碼B.status_code:Request對象的未渲染內(nèi)容C.content:response的呈現(xiàn)內(nèi)容,render()方法必須先調(diào)用才能訪問contentD.template_name:template_name只有在使用HTMLRenderer 或者其他自定義模板作為response的渲染器時才需要提供該屬性
A.限流,就是限制對API的調(diào)用頻率B.AnonRateThrottle類:用于限制未認證用戶的訪問頻率,限制依據(jù)是用戶的ipC.UserRateThrottle類:用于限定認證用戶,即網(wǎng)站的注冊用戶D.AnonRateThrottle類和UserRateThrottle類,不可以用于同一API
A.CreateModelMixin:提供create方法用于創(chuàng)建資源B.ListModelMixin和RetrieveModelMixin:提供update方法用于更新資源C.UpdateModelMixin:提供destroy方法用于刪除資源D.DestroyModelMixin:提供list和retrieve,分別用于獲取資源列表和單個資源