My code sends get requests to the endpoint without me sending.
anyone had this problem before?
please if anyone knows, just ping me on this email to talk: charbeldaher34@gmail.com
My code sends get requests to the endpoint without me sending.
anyone had this problem before?
please if anyone knows, just ping me on this email to talk: charbeldaher34@gmail.com
You’re going to need to provide a lot more detail here for us to even begin trying to diagnose this.
Please describe in a lot more detail what code you’re talking about, what your environment is, and how you’re seeing these requests.
i have a html template that sends a post request to an endpoint, when I send this request, a post request correctly goes through and directly after it finishes a get request is automatically sent to this endpoint
do you want the source code?
That’s normal.
In the common-case for handling POSTs, Django ends the handling of that POST by redirecting to what it refers to as the “success url”.
how can i stop it from sending the get request?
is there any method?
There are two ways I can think of right off-hand.
Don’t have your front-end follow redirects after a POST.
Change your back end to not send the redirect after a POST. (Unless you’re issuing these posts from JavaScript, I strongly recommend against doing this.)