diff options
author | Avi Goldman <avrahamymgoldman@gmail.com> | 2016-06-10 15:17:23 -0400 |
---|---|---|
committer | Avi Goldman <avrahamymgoldman@gmail.com> | 2016-06-10 15:17:23 -0400 |
commit | 2b42579b80783dee90197579d9a15208cb87a71e (patch) | |
tree | d03c1a983d7b13bd7410e7d2ccf784fe4d724027 | |
parent | 0cebe422480e3df4b633a5e74452b6b00351cfe6 (diff) | |
download | php-sparkpost-2b42579b80783dee90197579d9a15208cb87a71e.zip php-sparkpost-2b42579b80783dee90197579d9a15208cb87a71e.tar.gz php-sparkpost-2b42579b80783dee90197579d9a15208cb87a71e.tar.bz2 |
added support for async/sync option
-rw-r--r-- | lib/SparkPost/SparkPost.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/SparkPost/SparkPost.php b/lib/SparkPost/SparkPost.php index 05a73b1..53a669b 100644 --- a/lib/SparkPost/SparkPost.php +++ b/lib/SparkPost/SparkPost.php @@ -33,10 +33,10 @@ class SparkPost public function request($method = 'GET', $uri = '', $payload = [], $headers = []) { if ($this->options['async'] === true && $this->httpClient instanceof HttpAsyncClient) { - $this->syncRequest($method = 'GET', $uri = '', $payload = [], $headers = []); + $this->asyncRequest($method, $uri, $payload, $headers); } else { - $this->asyncRequest($method = 'GET', $uri = '', $payload = [], $headers = []); + $this->syncRequest($method, $uri, $payload, $headers); } } |