|
@@ 153-159 (lines=7) @@
|
| 150 |
|
curl_setopt($crl, CURLOPT_POSTFIELDS, ltrim($postfields, '?')); |
| 151 |
|
} |
| 152 |
|
break; |
| 153 |
|
case 'PUT': |
| 154 |
|
curl_setopt($crl, CURLOPT_CUSTOMREQUEST, 'PUT'); |
| 155 |
|
curl_setopt($crl, CURLOPT_HTTPHEADER, array('Content-Length: ' . strlen($postfields))); |
| 156 |
|
if ($postfields !== null) { |
| 157 |
|
curl_setopt($crl, CURLOPT_POSTFIELDS, ltrim($postfields, '?')); |
| 158 |
|
} |
| 159 |
|
break; |
| 160 |
|
case 'DELETE': |
| 161 |
|
curl_setopt($crl, CURLOPT_CUSTOMREQUEST, 'DELETE'); |
| 162 |
|
curl_setopt($crl, CURLOPT_HTTPHEADER, array('Content-Length: ' . strlen($postfields))); |
|
@@ 160-165 (lines=6) @@
|
| 157 |
|
curl_setopt($crl, CURLOPT_POSTFIELDS, ltrim($postfields, '?')); |
| 158 |
|
} |
| 159 |
|
break; |
| 160 |
|
case 'DELETE': |
| 161 |
|
curl_setopt($crl, CURLOPT_CUSTOMREQUEST, 'DELETE'); |
| 162 |
|
curl_setopt($crl, CURLOPT_HTTPHEADER, array('Content-Length: ' . strlen($postfields))); |
| 163 |
|
if ($postfields !== null) { |
| 164 |
|
curl_setopt($crl, CURLOPT_POSTFIELDS, ltrim($postfields, '?')); |
| 165 |
|
} |
| 166 |
|
} |
| 167 |
|
|
| 168 |
|
curl_setopt($crl, CURLOPT_URL, $uri); |