| @@ 24-38 (lines=15) @@ | ||
| 21 | * |
|
| 22 | * @return Response |
|
| 23 | */ |
|
| 24 | public function post($resource, array $args = [], array $options = []) |
|
| 25 | { |
|
| 26 | $response = parent::post($resource, $args, $options); |
|
| 27 | ||
| 28 | $this->calls[] = [ |
|
| 29 | 'method' => 'POST', |
|
| 30 | 'resource' => $resource, |
|
| 31 | 'args' => $args, |
|
| 32 | 'options' => $options, |
|
| 33 | 'success' => $response->success(), |
|
| 34 | 'response' => $response->getBody(), |
|
| 35 | ]; |
|
| 36 | ||
| 37 | return $response; |
|
| 38 | } |
|
| 39 | ||
| 40 | /** |
|
| 41 | * Trigger a GET request |
|
| @@ 49-63 (lines=15) @@ | ||
| 46 | * |
|
| 47 | * @return Response |
|
| 48 | */ |
|
| 49 | public function get($resource, array $args = [], array $options = []) |
|
| 50 | { |
|
| 51 | $response = parent::get($resource, $args, $options); |
|
| 52 | ||
| 53 | $this->calls[] = [ |
|
| 54 | 'method' => 'GET', |
|
| 55 | 'resource' => $resource, |
|
| 56 | 'args' => $args, |
|
| 57 | 'options' => $options, |
|
| 58 | 'success' => $response->success(), |
|
| 59 | 'response' => $response->getBody(), |
|
| 60 | ]; |
|
| 61 | ||
| 62 | return $response; |
|
| 63 | } |
|
| 64 | ||
| 65 | /** |
|
| 66 | * Trigger a POST request |
|
| @@ 74-88 (lines=15) @@ | ||
| 71 | * |
|
| 72 | * @return Response |
|
| 73 | */ |
|
| 74 | public function put($resource, array $args = [], array $options = []) |
|
| 75 | { |
|
| 76 | $response = parent::put($resource, $args, $options); |
|
| 77 | ||
| 78 | $this->calls[] = [ |
|
| 79 | 'method' => 'PUT', |
|
| 80 | 'resource' => $resource, |
|
| 81 | 'args' => $args, |
|
| 82 | 'options' => $options, |
|
| 83 | 'success' => $response->success(), |
|
| 84 | 'response' => $response->getBody(), |
|
| 85 | ]; |
|
| 86 | ||
| 87 | return $response; |
|
| 88 | } |
|
| 89 | ||
| 90 | /** |
|
| 91 | * Trigger a GET request |
|
| @@ 99-113 (lines=15) @@ | ||
| 96 | * |
|
| 97 | * @return Response |
|
| 98 | */ |
|
| 99 | public function delete($resource, array $args = [], array $options = []) |
|
| 100 | { |
|
| 101 | $response = parent::delete($resource, $args, $options); |
|
| 102 | ||
| 103 | $this->calls[] = [ |
|
| 104 | 'method' => 'DELETE', |
|
| 105 | 'resource' => $resource, |
|
| 106 | 'args' => $args, |
|
| 107 | 'options' => $options, |
|
| 108 | 'success' => $response->success(), |
|
| 109 | 'response' => $response->getBody(), |
|
| 110 | ]; |
|
| 111 | ||
| 112 | return $response; |
|
| 113 | } |
|
| 114 | ||
| 115 | /** |
|
| 116 | * @return array |
|