2017-08-04 45 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