Thursday, April 22, 2021

Re: #Beginnerlevel Form sending get instead of post request

On 22/04/2021 17.14, chaitanya sakoji wrote:
> Previously this code was sending post request. Suddenly after restarting
> server, it started sending get.

I *think* I might understand what you mean.

The code you posted doesn't send anything. It handles POST request sent
from your browser. If you load a page with your browser normally, it
will send a GET request.

My guess is, that you've sent a POST request to the page (which works
fine) and then you load the same page in your browser sending a GET request.

Could that explain it.

Just to be clear. Your code will not start changing behavior without you
doing anything (self modifying code is indeed a thing, but that's not
relevant here at all).

Kind regards,

Kasper Laudrup

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/4c96bea3-db71-ca42-7158-9e1f3a9bc6ea%40stacktrace.dk.

No comments:

Post a Comment