Skip to content

Commit a9fc742

Browse files
committed
Add get parameters
1 parent 2b657d1 commit a9fc742

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/ConstantContact/Client.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,12 @@ public function get(string $url, array $parameters) : array
222222
{
223223
try
224224
{
225+
if ($parameters)
226+
{
227+
$paramString = urldecode(http_build_query($parameters));
228+
$url .= $url . '&' . urlencode(preg_replace('/\[[0-9]\]/', '', $paramString));
229+
}
230+
225231
$guzzle = new \GuzzleHttp\Client(['headers' => $this->getHeaders()]);
226232
$response = $guzzle->request('GET', $url);
227233

0 commit comments

Comments
 (0)