DRF Do Not Do Mistakes on API Endpoint Testing

admin
By -
0

 

30 Mistakes They Do Beginner on DRF API 


1#  Token Authentication -Generate Token with httpie using



In Django Rest If we have to implement  Tokens Authentication
and feature where every user can generate  using username and password from cmd  for there own token for them authentication using  and We have using api endpoint with user 
credentials
 for testing then please make some extra space after api endpoint  or between actual api endpoint url and user credentials
 e.g


http POST http://127.0.0.1:8000/api-token-auth/   username="user1"                  password="Password@123"

http POST http://127.0.0.1:8000/api-token-auth/   username="user1" password="Password@123"

Not  do this X

http POST http://127.0.0.1:8000/api-token-auth/username="user1" password="Password@123"

Remember also make space between username and password.






Tags:

Post a Comment

0Comments

Put Your Thought or Query Here

Post a Comment (0)