diff options
author | Christian Schneider | 2016-05-25 18:18:11 +0200 |
---|---|---|
committer | Christian Schneider | 2016-05-25 18:18:11 +0200 |
commit | cf9871809d88018a49775ea59d1ec58cf2fd4eb5 (patch) | |
tree | 058e978feaa41a9adbc64e8d1b50bb9bb926e928 | |
parent | 89a2fe5ba2dfbac07495fd1edbd1fb7e6fff1950 (diff) | |
download | itools-cf9871809d88018a49775ea59d1ec58cf2fd4eb5.tar.gz itools-cf9871809d88018a49775ea59d1ec58cf2fd4eb5.tar.bz2 itools-cf9871809d88018a49775ea59d1ec58cf2fd4eb5.zip |
Support method and data parameter in curl code path as well (used for https)
-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'], |