return $string;
}
- public function RESTCall($url, $data = null, $cookiesIn = '') {
+ public function RESTCall($url, $data = null, $cookiesIn = '', $headers = null) {
$options = array(
CURLOPT_RETURNTRANSFER => true, // return web page
CURLOPT_HEADER => true, //return headers in addition to content
$options[CURLOPT_POSTFIELDS] = $data;
}
+ if ($headers) {
+ $options[CURLOPT_HTTPHEADER] = $headers;
+ }
+
$ch = curl_init($url);
curl_setopt_array($ch, $options);
$rough_content = curl_exec($ch);