@@ 216-219 (lines=4) @@ | ||
213 | default: |
|
214 | curl_setopt($this->con, CURLOPT_CUSTOMREQUEST, "GET"); |
|
215 | break; |
|
216 | case 'POST': |
|
217 | curl_setopt($this->con, CURLOPT_CUSTOMREQUEST, "POST"); |
|
218 | curl_setopt($this->con, CURLOPT_POSTFIELDS, json_encode($this->params)); |
|
219 | break; |
|
220 | case 'DELETE': |
|
221 | curl_setopt($this->con, CURLOPT_CUSTOMREQUEST, "DELETE"); |
|
222 | break; |
|
@@ 223-226 (lines=4) @@ | ||
220 | case 'DELETE': |
|
221 | curl_setopt($this->con, CURLOPT_CUSTOMREQUEST, "DELETE"); |
|
222 | break; |
|
223 | case 'PUT': |
|
224 | curl_setopt($this->con, CURLOPT_CUSTOMREQUEST, "PUT"); |
|
225 | curl_setopt($this->con, CURLOPT_POSTFIELDS, json_encode($this->params)); |
|
226 | break; |
|
227 | case 'PATCH': |
|
228 | curl_setopt($this->con, CURLOPT_CUSTOMREQUEST, "PATCH"); |
|
229 | curl_setopt($this->con, CURLOPT_POSTFIELDS, json_encode($this->params)); |
|
@@ 227-230 (lines=4) @@ | ||
224 | curl_setopt($this->con, CURLOPT_CUSTOMREQUEST, "PUT"); |
|
225 | curl_setopt($this->con, CURLOPT_POSTFIELDS, json_encode($this->params)); |
|
226 | break; |
|
227 | case 'PATCH': |
|
228 | curl_setopt($this->con, CURLOPT_CUSTOMREQUEST, "PATCH"); |
|
229 | curl_setopt($this->con, CURLOPT_POSTFIELDS, json_encode($this->params)); |
|
230 | break; |
|
231 | } |
|
232 | ||
233 | curl_setopt($this->con, CURLOPT_RETURNTRANSFER, true); |