File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ public function __construct(string $authToken)
6161 */
6262 public function getMailingLists (string $ sort = 'desc ' , int $ fromIndex = null , int $ range = null ): object
6363 {
64- return $ this ->getRequest ('getmailinglists ' , [
64+ return $ this ->postRequest ('getmailinglists ' , [
6565 'sort ' => $ sort ,
6666 'fromindex ' => $ fromIndex ,
6767 'range ' => $ range ,
@@ -500,6 +500,17 @@ private function post($endPoint)
500500 return $ this ->client ->post ($ this ->getEndpoint ($ endPoint ), $ this ->headers );
501501 }
502502
503+ private function get ($ endPoint )
504+ {
505+ if ($ this ->requestAsync === true ) {
506+ $ promise = $ this ->client ->getAsync ($ this ->getEndpoint ($ endPoint ), $ this ->headers );
507+
508+ return (is_callable ($ this ->requestCallback ) ? $ promise ->then ($ this ->requestCallback ) : $ promise );
509+ }
510+
511+ return $ this ->client ->get ($ this ->getEndpoint ($ endPoint ), $ this ->headers );
512+ }
513+
503514 /**
504515 * @param $endPoint
505516 *
You can’t perform that action at this time.
0 commit comments