How do I redirect to a route with POST method? I want to redirect to a route and also want to send some parameters which I don't want to expose on URL.

So, I need to redirect with a post method. How to do this?

$form_state-&gt;setRedirect('route.name', array('key' =&gt; 'value'));
new RedirectResponse(\Drupal::url('route.name',array('key' =&gt; 'value')));


all these above procedure to redirect is done through GET methods.

So, is it possible to do this with POST method?
Normally, you cannot redirect through a HTTP "POST" response. A normal Drupal RedirectResponse (or whatever redirect response you send) will be a 302 or 301 redirect, which is done through the GET method.

Basically, you can do a subrequest, as suggested by Eyal, or you can add some server validation to grant a "200 OK" response through your "hidden" route, such as a CSRF token. To keep alive some posted information, you can use your Session service to flash them for the next request, then flush them in your hidden route after your validation