This is a pared back version of the task I assigned earlier - and it's still an important and useful task! Set up a dummy endpoint using Django. The endpoint should return a json string {testResponse: 'success'}. Use JsonResponse in views.py file to do this. Then, set up an endpoint /test in urls.py. Finally, download the Postman application and test that your endpoint works.
The dummy endpoint will be useful for us to double check that our server is actually working. When our real endpoints have bugs or aren't doing what they should be doing, we can use the dummy endpoint to narrow down where the problem could be.
This is a pared back version of the task I assigned earlier - and it's still an important and useful task! Set up a dummy endpoint using Django. The endpoint should return a json string
{testResponse: 'success'}
. UseJsonResponse
inviews.py
file to do this. Then, set up an endpoint/test
inurls.py
. Finally, download the Postman application and test that your endpoint works.The dummy endpoint will be useful for us to double check that our server is actually working. When our real endpoints have bugs or aren't doing what they should be doing, we can use the dummy endpoint to narrow down where the problem could be.
Views: https://docs.djangoproject.com/en/dev/ref/request-response/#jsonresponse-objects https://stackoverflow.com/questions/35019030/how-to-return-custom-json-in-django-rest-framework
Routes: https://www.caktusgroup.com/blog/2019/02/01/creating-api-endpoint-django-rest-framework/
Postman: https://www.postman.com/downloads/ https://buttercms.com/blog/postman-testing-the-api-development-environment