From cf9871809d88018a49775ea59d1ec58cf2fd4eb5 Mon Sep 17 00:00:00 2001 From: Christian Schneider Date: Wed, 25 May 2016 18:18:11 +0200 Subject: Support method and data parameter in curl code path as well (used for https) --- it_url.class | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/it_url.class b/it_url.class index 33ceb7b..52a72d0 100644 --- a/it_url.class +++ b/it_url.class @@ -284,6 +284,9 @@ static function curl_opts($p=array()) ); } + if ($p['data']) + $add[CURLOPT_POSTFIELDS] = $p['data']; + return (array)$add + array( CURLOPT_HEADER => false, CURLOPT_RETURNTRANSFER => true, @@ -292,6 +295,7 @@ static function curl_opts($p=array()) CURLOPT_LOW_SPEED_TIME => $p['timeout'], CURLOPT_FOLLOWLOCATION => false, CURLOPT_HTTPHEADER => $headers, + CURLOPT_CUSTOMREQUEST => $p['method'] ?: null, CURLOPT_CAPATH => '/etc/ssl/certs/', CURLOPT_SSL_VERIFYPEER => !$p['allow_insecure_ssl'], -- cgit v1.2.3