curl -G "https://exchangerate.webs.hn/api/latest/?key=YOUR-APIKEY"
$json = file_get_contents('https://exchangerate.webs.hn/api/latest/?key=YOUR-APIKEY'); $array = json_decode($json, true); print_r($array);
const request = require('request-promise'); request('https://exchangerate.webs.hn/api/latest/?key=YOUR-APIKEY') .then(response => { console.log(response) }) .catch(error => { console.log(error) })
try { String apikey = 'YOUR-APIKEY'; String url = "https://exchangerate.webs.hn/api/latest/?key=" + apikey; URL urlForGetRequest = new URL(url); String readLine = null; HttpURLConnection conection = (HttpURLConnection) urlForGetRequest.openConnection(); conection.setRequestMethod("GET"); int responseCode = conection.getResponseCode(); if (responseCode == HttpURLConnection.HTTP_OK) { BufferedReader in = new BufferedReader(new InputStreamReader(conection.getInputStream())); StringBuffer response = new StringBuffer(); while ((readLine = in.readLine()) != null) { response.append(readLine); } in.close(); System.out.println(response.toString()); } else { throw new Exception("Error in API Call"); } } catch (Exception ex) { ex.printStackTrace(); }
curl -G "https://exchangerate.webs.hn/api/latest/?key=2324a6ee6-dcc3-11aa-bace-9e3357c61e22"