|
@@ -889,7 +889,7 @@ class utils
|
|
* @return string The result of the POST request
|
|
* @return string The result of the POST request
|
|
* @throws Exception
|
|
* @throws Exception
|
|
*/
|
|
*/
|
|
- static public function DoPostRequest($sUrl, $aData, $sOptionnalHeaders = null)
|
|
|
|
|
|
+ static public function DoPostRequest($sUrl, $aData, $sOptionnalHeaders = null, &$aResponseHeaders = null)
|
|
{
|
|
{
|
|
// $sOptionnalHeaders is a string containing additional HTTP headers that you would like to send in your request.
|
|
// $sOptionnalHeaders is a string containing additional HTTP headers that you would like to send in your request.
|
|
|
|
|
|
@@ -928,6 +928,11 @@ class utils
|
|
{
|
|
{
|
|
throw new Exception("Problem reading data from $sUrl, $php_errormsg");
|
|
throw new Exception("Problem reading data from $sUrl, $php_errormsg");
|
|
}
|
|
}
|
|
|
|
+ if (is_array($aResponseHeaders))
|
|
|
|
+ {
|
|
|
|
+ $aMeta = stream_get_meta_data($fp);
|
|
|
|
+ $aResponseHeaders = $aMeta['wrapper_data'];
|
|
|
|
+ }
|
|
return $response;
|
|
return $response;
|
|
}
|
|
}
|
|
}
|
|
}
|