Merge pull request #32 from mremi/filter-request-headers

Added method to tweak HTTP headers of request
This commit is contained in:
Francis Besset 2014-04-24 17:22:00 +02:00
commit 02722eae8f
1 changed files with 15 additions and 0 deletions

View File

@ -178,6 +178,8 @@ class SoapClient extends \SoapClient
$headers = array();
}
$headers = $this->filterRequestHeaders($soapRequest, $headers);
// execute HTTP request with cURL
$responseSuccessfull = $this->curl->exec(
$location,
@ -258,6 +260,19 @@ class SoapClient extends \SoapClient
return $soapResponse;
}
/**
* Filters HTTP headers which will be sent
*
* @param SoapRequest $soapRequest SOAP request object
* @param array $headers An array of HTTP headers
*
* @return array
*/
protected function filterRequestHeaders(SoapRequest $soapRequest, array $headers)
{
return $headers;
}
/**
* Get last request HTTP headers.
*