Urgent

33 views
Skip to first unread message

Aman Khan

unread,
Mar 1, 2021, 7:16:50 PM3/1/21
to Django users
How to make delete request to API from the frontend, i typed the localhost URL for API but it is redirecting me to the browsable API but by the postman, the data is successfully deleted, please someone help me out

Dylan Reinhold

unread,
Mar 1, 2021, 7:47:30 PM3/1/21
to django...@googlegroups.com
Don't put urgent as your subject if you don't want people to just block you future emails.

Dylan

On Mon, Mar 1, 2021, 4:16 PM Aman Khan <amanaya...@gmail.com> wrote:
How to make delete request to API from the frontend, i typed the localhost URL for API but it is redirecting me to the browsable API but by the postman, the data is successfully deleted, please someone help me out

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/b624e4d3-b0a1-4b90-91eb-552deaa50d28n%40googlegroups.com.

Class Udeh

unread,
Mar 2, 2021, 2:50:18 AM3/2/21
to django...@googlegroups.com
Hello,
Make use of restApi router which will give you the crud url and in ur front end pass the url and add and ID to the url using axios.delete("url/${I'd}, token of the user)


From: django...@googlegroups.com <django...@googlegroups.com> on behalf of Dylan Reinhold <drei...@gmail.com>
Sent: Tuesday, March 2, 2021 1:46:34 AM
To: django...@googlegroups.com <django...@googlegroups.com>
Subject: Re: Urgent
 

Aman Khan

unread,
Mar 2, 2021, 6:46:43 AM3/2/21
to Django users
Thanks for the answer, Actually the problem was in my fetch api code. In short i wasn't sending the csrf token with the request 

Jian He

unread,
Mar 2, 2021, 9:21:29 AM3/2/21
to django...@googlegroups.com
First, please do not put Urgent if it is just local debugging, it is normal. 
Secondly, please explain your circumstance clearly, how, what and what you want to achieve, 
otherwise how come community can help?


Reply all
Reply to author
Forward
0 new messages