From 34fab243bd806c2301f7f0c47084372245ec932f Mon Sep 17 00:00:00 2001 From: James Date: Tue, 12 Feb 2019 09:00:25 -0500 Subject: [PATCH] removing spaces from curlopt_httpheader opt --- CurlLib/curlwrap_v2.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/CurlLib/curlwrap_v2.php b/CurlLib/curlwrap_v2.php index eea0407..a85539f 100644 --- a/CurlLib/curlwrap_v2.php +++ b/CurlLib/curlwrap_v2.php @@ -14,11 +14,12 @@ define("AGILE_USER_EMAIL", "YOUR_AGILE_USER_EMAIL"); define("AGILE_REST_API_KEY", "YOUR_AGILE_REST_API_KEY"); -function curl_wrap($entity, $data, $method, $content_type) { - if ($content_type == NULL) { +function curl_wrap($entity, $data, $method, $content_type) +{ + if ($content_type == null) { $content_type = "application/json"; } - + $agile_url = "https://" . AGILE_DOMAIN . ".agilecrm.com/dev/api/" . $entity; $ch = curl_init(); @@ -52,7 +53,7 @@ function curl_wrap($entity, $data, $method, $content_type) { break; } curl_setopt($ch, CURLOPT_HTTPHEADER, array( - "Content-type : $content_type;", 'Accept : application/json' + "Content-type:$content_type;", 'Accept:application/json' )); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_USERPWD, AGILE_USER_EMAIL . ':' . AGILE_REST_API_KEY);