
Enrique - 2014-07-17 13:29:30
Hi there!
i dont know if you do it on porpuse, but you did this CURL class RESTful. Just 2 things:
1.- delete all the var_dumps() before upload stuffs :)
2.- you can refactor/recicle the post method eliminating the option:
$this->opts[CURLOPT_POST]
by leaving the option
$this->opts[CURLOPT_CUSTOMREQUEST] = strtoupper(trim($method));
will work like a charm (tested on php 5.5). Therefore, rename the function to something like:
public function httpRequest(array $data, string $method){}
Good class BTW im going to use it on my own projects!
I really hope that this can become useful.
C-Ya! Greetings from Venezuela!