How does your client call your POST API? Via AJAX (assuming, CORS header properly set), or via action attribute of the form? If it is called via action attribute, then there should be no problem with HTTPResponseRedirect. You probably need a bug fixing. If it is called via Ajax, then, IMO, there is no way other than setting JS window.location.
Regards, Aldian Fazrihady. On Fri, Jun 7, 2019 at 6:30 PM Mark Davies Tan <fyrla...@gmail.com> wrote: > Hi all, > > I have this scenario. I have a client who wants to call a POST API of mine > which then redirects to my site. So client has his own site which has a > button that does a POST to my registration API to register a user onto my > site and should automatically redirect to my site without the client > needing to do anything other than call my API. The client isn't willing to > place a code like window.location upon getting a response from the POST > call. So the redirecting has to be done by my django API. I've tried > returning a HTTPResponseRedirect when the POST is called but nothing > happens. Since I don't have access to my client's code, I've been testing > it out on w3schools and jsfiddle. Any clues on this? > > Thanks, > Mark > > -- > 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+unsubscr...@googlegroups.com. > To post to this group, send email to django-users@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/77af30ce-2adc-49c9-b7b5-1f7e65318694%40googlegroups.com > <https://groups.google.com/d/msgid/django-users/77af30ce-2adc-49c9-b7b5-1f7e65318694%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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+unsubscr...@googlegroups.com. To post to this group, send email to django-users@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/CAN7EoAZkOU1Xrywidx9muEqFJ1TokcZ%2BqdbYkoD4eqo4GHH65A%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.