I am trying to make a Get request , but am getting this error :
AttributeError: 'Request' object has no attribute 'Get'
Below is my code :
class VerifyEmail(APIView):
"""Verify user account."""
serializer_class = EmailVerificationSerializer
def get(self, request):
"""Obtain email token."""
token = request.Get.get('token')
payload = jwt.decode(token, settings.SECRET_KEY)
In the urls.py :
path('email-verify/', views.VerifyEmail.as_view(), name='email-verify'),
The issue is on this line :
token = request.Get.get('token')
What could be the issue for this ?
token = request.Get.get('token')
this should be
token = request.GET.get('token')
GET in all capital
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With