diff --git a/src/Api/HttpApi.php b/src/Api/HttpApi.php index d7c28c3..bb566df 100644 --- a/src/Api/HttpApi.php +++ b/src/Api/HttpApi.php @@ -118,7 +118,7 @@ abstract class HttpApi protected function httpGet(string $path, array $parameters = [], array $requestHeaders = []): ResponseInterface { if (count($parameters) > 0) { - $path .= '?'.urldecode(http_build_query($parameters)); + $path .= '?'.http_build_query($parameters); } try { diff --git a/tests/Api/EmailValidationV4Test.php b/tests/Api/EmailValidationV4Test.php index ed6af69..21dddd3 100755 --- a/tests/Api/EmailValidationV4Test.php +++ b/tests/Api/EmailValidationV4Test.php @@ -42,7 +42,7 @@ class EmailValidationV4Test extends TestCase public function testInvalidEmail() { $this->setRequestMethod('GET'); - $this->setRequestUri('/v4/address/validate?address=email@example.com&provider_lookup=1'); + $this->setRequestUri('/v4/address/validate?address=email%40example.com&provider_lookup=1'); $this->setHttpResponse(new Response(200, ['Content-Type' => 'application/json'], <<<'JSON' { "address": "email@example.com", @@ -77,7 +77,7 @@ JSON public function testValidEmail() { $this->setRequestMethod('GET'); - $this->setRequestUri('/v4/address/validate?address=email3@example.com&provider_lookup=0'); + $this->setRequestUri('/v4/address/validate?address=email3%40example.com&provider_lookup=0'); $this->setHttpResponse(new Response(200, ['Content-Type' => 'application/json'], <<<'JSON' { "address": "email3@example.com",