| @@ 99-105 (lines=7) @@ | ||
| 96 | * |
|
| 97 | * @return Response |
|
| 98 | */ |
|
| 99 | public function post($uri, array $body = [], array $options = []) |
|
| 100 | { |
|
| 101 | if (!empty($body)) { |
|
| 102 | $options['json'] = $body; |
|
| 103 | } |
|
| 104 | return $this->guzzle->post($uri, $options); |
|
| 105 | } |
|
| 106 | ||
| 107 | /** |
|
| 108 | * @param string $uri |
|
| @@ 114-120 (lines=7) @@ | ||
| 111 | * |
|
| 112 | * @return Promise |
|
| 113 | */ |
|
| 114 | public function postAsync($uri, array $body = [], array $options = []) |
|
| 115 | { |
|
| 116 | if (!empty($body)) { |
|
| 117 | $options['json'] = $body; |
|
| 118 | } |
|
| 119 | return $this->guzzle->postAsync($uri, $options); |
|
| 120 | } |
|
| 121 | } |
|
| 122 | ||