I'm trying to POST from one controller method to another with the Http class.
$http = new Http();
$url = Uri::base().'index.php?option=com_mycontroller&task=my_method';
$response = $http->post($url, []);
die($response->getBody());
But it just returns a redirect to the login page.
How can I post to this method with authentication?