@@ -38,33 +38,33 @@ public function __construct() {
38
38
public function get ($ url , $ data =array ()) {
39
39
$ this ->setopt (CURLOPT_URL , $ url . '? ' . http_build_query ($ data ));
40
40
$ this ->setopt (CURLOPT_HTTPGET , TRUE );
41
- $ this ->_exec ();
41
+ return $ this ->_exec ();
42
42
}
43
43
44
44
public function post ($ url , $ data =array ()) {
45
45
$ this ->setopt (CURLOPT_URL , $ url );
46
46
$ this ->setopt (CURLOPT_POST , TRUE );
47
47
$ this ->setopt (CURLOPT_POSTFIELDS , $ this ->_postfields ($ data ));
48
- $ this ->_exec ();
48
+ return $ this ->_exec ();
49
49
}
50
50
51
51
public function put ($ url , $ data =array ()) {
52
52
$ this ->setopt (CURLOPT_URL , $ url . '? ' . http_build_query ($ data ));
53
53
$ this ->setopt (CURLOPT_CUSTOMREQUEST , 'PUT ' );
54
- $ this ->_exec ();
54
+ return $ this ->_exec ();
55
55
}
56
56
57
57
public function patch ($ url , $ data =array ()) {
58
58
$ this ->setopt (CURLOPT_URL , $ url );
59
59
$ this ->setopt (CURLOPT_CUSTOMREQUEST , 'PATCH ' );
60
60
$ this ->setopt (CURLOPT_POSTFIELDS , $ data );
61
- $ this ->_exec ();
61
+ return $ this ->_exec ();
62
62
}
63
63
64
64
public function delete ($ url , $ data =array ()) {
65
65
$ this ->setopt (CURLOPT_URL , $ url . '? ' . http_build_query ($ data ));
66
66
$ this ->setopt (CURLOPT_CUSTOMREQUEST , 'DELETE ' );
67
- $ this ->_exec ();
67
+ return $ this ->_exec ();
68
68
}
69
69
70
70
public function setBasicAuthentication ($ username , $ password ) {
0 commit comments