@@ 50-58 (lines=9) @@ | ||
47 | return $this; |
|
48 | } |
|
49 | ||
50 | public function add($method, $uri, $payload, array $options = array()) { |
|
51 | $options = array( |
|
52 | 'method' => $method, |
|
53 | 'url' => $uri, |
|
54 | 'data' => $payload, |
|
55 | )+$options; |
|
56 | $this->addOptions(array($options)); |
|
57 | return $this; |
|
58 | } |
|
59 | ||
60 | public function import(Request $request) { |
|
61 | if (!is_resource($request->curlHandle)) {throw new InvalidArgumentException('Request curl handle is not initialized'); |
@@ 235-241 (lines=7) @@ | ||
232 | ||
233 | /* no body */ |
|
234 | ||
235 | protected function ini($method, $url, $data , array $options = array()) |
|
236 | { |
|
237 | $options = array('url' => $url, 'method' => $method, 'data' => $data) + $options; |
|
238 | $this->addOptions($options); |
|
239 | ||
240 | return $this; |
|
241 | } |
|
242 | ||
243 | public function addOptions(array $options = array()) |
|
244 | { |