/**
  * Sends a prepared request and returns the respective response.
  *
  * @param \TYPO3\Flow\Http\Request $request
  * @return \TYPO3\Flow\Http\Response
  * @api
  */
 public function sendRequest(Request $request)
 {
     foreach ($this->automaticRequestHeaders->getAll() as $name => $values) {
         $request->setHeader($name, $values);
     }
     $this->lastRequest = $request;
     $this->lastResponse = $this->requestEngine->sendRequest($request);
     return $this->lastResponse;
 }
 /**
  * @test
  */
 public function removeRemovesTheSpecifiedHeader()
 {
     $specifiedFields = array('X-Coffee' => 'Arabica', 'Host' => 'myhost.com');
     $headers = new Headers($specifiedFields);
     $headers->remove('X-Coffee');
     $headers->remove('X-This-Does-Not-Exist-Anyway');
     $this->assertEquals(array('Host' => array('myhost.com')), $headers->getAll());
 }