Home > Blockchain >  Laminas toRoute as POST?
Laminas toRoute as POST?

Time:10-20

I work with Laminas and in a ControllerAction function I want to redirect to another url as a post by using $this->redirect()->toRoute('newSite', $noURLParams, $options); When I use the "query"-Option ($options = [$query => ['postPara1' => 'blabla', 'postPara2' => 'blubblub']]), I will get the "post"-Parameter as GET-Parameter in the URL:

hhttp://localhost/new-site?postPara1=blabla&postPara2=blubblub

So everyone could see the content of the parameters.

Is there a way to get the toRoute() to make a "POST" out of it? Or do I have to use another function for this?

CodePudding user response:

Thank you for your interest and help. After you said that it doesn't work, I changed the sequence of what, when should be called and now I can do it without an additional redirect.

  • Related