When need return the HttpResponseBadRequest and why?

46 views
Skip to first unread message

Seti Volkylany

unread,
Jul 4, 2016, 1:44:35 PM7/4/16
to Django users
.

Gergely Polonkai

unread,
Jul 4, 2016, 3:34:32 PM7/4/16
to Django users

400 Bad Request is responded if the client sends a… um… Bad Request?

Jokes aside, it may represent many things. Web servers may send 400 if the HTTP request is malformed. Applications, such as a Django app, may send 400 if the request cannot be processed, e.g. when a required header is missing or (with REST APIs) if a JSON field is not present or contains an invalid value.

Best,
Gergely

On Jul 4, 2016 19:44, "Seti Volkylany" <setivo...@gmail.com> wrote:
.

--
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 post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/7f2bfae4-66d1-44c6-9255-4f862d42d43b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Seti Volkylany

unread,
Jul 5, 2016, 9:48:05 AM7/5/16
to django...@googlegroups.com
I am used the HttpBadRequest only if input is not correct, but url for view is correct.
Thank you

--
You received this message because you are subscribed to a topic in the Google Groups "Django users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-users/wTE0jeXulD4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to django-users...@googlegroups.com.

To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
Reply all
Reply to author
Forward
0 new messages