Skip to content
Snippets Groups Projects

Resolve #3146351 "Automated drupal 9"

3 files
+ 37
22
Compare changes
  • Side-by-side
  • Inline

Files

+ 10
8
@@ -5,10 +5,6 @@ namespace Drupal\byteplant_email_validation;
@@ -5,10 +5,6 @@ namespace Drupal\byteplant_email_validation;
use Drupal\Core\Config\ConfigFactoryInterface;
use Drupal\Core\Config\ConfigFactoryInterface;
use GuzzleHttp\Client;
use GuzzleHttp\Client;
define('BYTEPLANT_OK_VALID_ADDRESS', 200);
define('BYTEPLANT_OK_CATCH_All_ACTIVE', 207);
define('BYTEPLANT_OK_CATCH_All_TEST_DELAYED', 215);
/**
/**
* Class EmailValidationService.
* Class EmailValidationService.
*
*
@@ -80,10 +76,16 @@ class EmailValidationService {
@@ -80,10 +76,16 @@ class EmailValidationService {
* @return mixed|string
* @return mixed|string
*/
*/
public function getRequest($url, $options = NULL) {
public function getRequest($url, $options = NULL) {
$client = $this->httpClient;
try {
$request = $client->get($url, $options);
$client = $this->httpClient;
$content = $request->getBody()->getContents();
$request = $client->get($url, $options);
$content = json_decode($content);
$content = $request->getBody()->getContents();
 
$content = json_decode($content);
 
}
 
catch (\Exception $e) {
 
watchdog_exception('byteplant_email_validation', $e);
 
$content = [];
 
}
return $content;
return $content;
}
}
Loading