Created
August 4, 2020 05:05
-
-
Save suryanto/138480b39482505ef34fb4fd9986d2bc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Drupal\Component\Serialization\Json; | |
/** @var \GuzzleHttp\Client $client */ | |
$client = \Drupal::service('http_client_factory')->fromOptions([ | |
'base_uri' => 'https://pweb.permata.xituz.com/', | |
]); | |
$response = $client->get('sites/default/files/feeds/dummy_mf.json'); | |
$json_data = Json::decode($response->getBody()); | |
$json_data = $json_data['MFProductInqRs']['MFProductInqList']; | |
foreach ($json_data as $data) { | |
print_r($data); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment