@@ 133-139 (lines=7) @@ | ||
130 | curl_setopt($crl, CURLOPT_POSTFIELDS, ltrim($postfields, '?')); |
|
131 | } |
|
132 | break; |
|
133 | case 'PUT': |
|
134 | curl_setopt($crl, CURLOPT_CUSTOMREQUEST, 'PUT'); |
|
135 | curl_setopt($crl, CURLOPT_HTTPHEADER, array('Content-Length: ' . strlen($postfields))); |
|
136 | if ($postfields !== null) { |
|
137 | curl_setopt($crl, CURLOPT_POSTFIELDS, ltrim($postfields, '?')); |
|
138 | } |
|
139 | break; |
|
140 | case 'DELETE': |
|
141 | curl_setopt($crl, CURLOPT_CUSTOMREQUEST, 'DELETE'); |
|
142 | curl_setopt($crl, CURLOPT_HTTPHEADER, array('Content-Length: ' . strlen($postfields))); |
|
@@ 140-145 (lines=6) @@ | ||
137 | curl_setopt($crl, CURLOPT_POSTFIELDS, ltrim($postfields, '?')); |
|
138 | } |
|
139 | break; |
|
140 | case 'DELETE': |
|
141 | curl_setopt($crl, CURLOPT_CUSTOMREQUEST, 'DELETE'); |
|
142 | curl_setopt($crl, CURLOPT_HTTPHEADER, array('Content-Length: ' . strlen($postfields))); |
|
143 | if ($postfields !== null) { |
|
144 | curl_setopt($crl, CURLOPT_POSTFIELDS, ltrim($postfields, '?')); |
|
145 | } |
|
146 | } |
|
147 | ||
148 | curl_setopt($crl, CURLOPT_URL, $uri); |