Replacd the API call impementation
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services;
|
||||
use GuzzleHttp\Client as HTTPClient;
|
||||
|
||||
class WpContentsClient
|
||||
{
|
||||
public static function serviceGetBlogItems($blogUrl)
|
||||
{
|
||||
$client = new HTTPClient();
|
||||
$apiEndpointsConfig = $blogUrl; //"http://172.31.4.19:8000";
|
||||
// $apiEndpointsConfig = config('ApiEndpoints');
|
||||
|
||||
$response = $client->request(
|
||||
'GET',
|
||||
"{$apiEndpointsConfig}/wordpress-data"
|
||||
);
|
||||
|
||||
return json_decode($response->getBody());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user