Skip to content

Commit

Permalink
Update Curl.utility.php
Browse files Browse the repository at this point in the history
Allowed the return of the initial request headers in the getRequestInformation() function call
  • Loading branch information
danrwalker committed Jan 30, 2017
1 parent e305c79 commit c5b5199
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dist/twist/Core/Utilities/Curl.utility.php
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,9 @@ protected function makeRequest($strURL,$arrRequestData = array(),$strType = 'get
curl_setopt($resCurl, CURLOPT_USERAGENT, $this->strUserAgent);
}

//Enable the request headers "request_header" to be added into the debug as well as the response headers
curl_setopt($resCurl, CURLINFO_HEADER_OUT, true);

//execute post
$mxdResponse = curl_exec($resCurl);
$this->arrRequestInfo = curl_getinfo($resCurl);
Expand Down Expand Up @@ -432,4 +435,4 @@ protected function httpParseHeaders($mxdRawHeaders){

return $arrHeaders;
}
}
}

0 comments on commit c5b5199

Please sign in to comment.