diff options
-rw-r--r-- | it_url.class | 4 |
1 files changed, 4 insertions, 0 deletions
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'], |