/** * Submit a post request * * @uses Director::test() * @param string $url * @param array $data * @param array $headers * @param Session $session * @param string $body * @param array $cookies * @return SS_HTTPResponse */ public function post($url, $data, $headers = null, $session = null, $body = null, $cookies = null) { $this->cssParser = null; $response = $this->mainSession->post($url, $data, $headers, $session, $body, $cookies); if ($this->autoFollowRedirection && is_object($response) && $response->getHeader('Location')) { $response = $this->mainSession->followRedirection(); } return $response; }