2017-08-04 59 views

回答

0

休息框架的可瀏覽API是一個json。沒有必要寫

格式= JSON

在url

,只是UI

如果捲曲API根:

curl -I http://drf-demo.herokuapp.com/api/universities/ 
HTTP/1.1 200 OK 
Connection: keep-alive 
Server: gunicorn/19.4.5 
Date: Fri, 04 Aug 2017 08:12:52 GMT 
Transfer-Encoding: chunked 
Vary: Accept, Cookie 
X-Frame-Options: SAMEORIGIN 
Allow: GET, POST, HEAD, OPTIONS 
Content-Type: application/json 
Via: 1.1 vegur