10. let see what is api root from output of rest framework and find out inital review

ok in the output

u can see api root which is acutally very important when we talk about REST Framework




ok it is little bit confusing when we see the output..... ie.


 
o/p (when it is default page before login )
====
 
 
 
GET /
HTTP 403 Forbidden
Content-Type: application/json
Vary: Accept
Allow: GET, HEAD, OPTIONS

{
    "detail": "Authentication credentials were not provided."
}
 
 
 
o/p(after login the status of out put)
 
====
 
 
GET /
HTTP 200 OK
Content-Type: application/json
Vary: Accept
Allow: GET, HEAD, OPTIONS

{
    "users": "http://127.0.0.1:8000/users/",
    "groups": "http://127.0.0.1:8000/groups/"
}
 
 
 
 
 
 
 
so let us see one by one heading where we can identify from the out put
 
 
ie., 
 
 
- GET 
- HTTP
- Content-Type
- Vary
- Allow

so to understand this we need to go some more deep about REST Framework....


to make some backup study...... to get what is going here...... right 



so that we will see in the next post about Rest Framework .....






No comments:

Post a Comment