Skip to content

amalinafz/surveyViaLaravel

Repository files navigation

Assessment

Use BNM Open API Data

  • Kijang_Emas

alt text

  • OPR

alt text

  • kl-usd-reference-rate

alt text


Able to retrieve the body via POSTMAN but unable to retrieve by using controller.

$client = new Client();
        $result = $client->get('https://api.bnm.gov.my/public/opr', [
            'headers' => [
                'Accept' => 'application/vnd.BNM.API.v1+json',
                'Content-Type' => 'application/json',
            ],
        ]);

        echo $result->getStatusCode();
        echo $result->getBody();
        if ($result->getStatusCode() == 200) { // 200 OK
        $response_data = $result->getBody()->getContents();
        }

alt text

Output

  1. Main

alt text

  1. Kijang_Emas

alt text

  1. OPR

alt text

  1. KL-USD-Reference-Rate

alt text

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published