import axios from 'axios';
import * as dotenv from 'dotenv';
dotenv.config({ path: '.env.local' });

async function test() {
  try {
    const res = await axios.get('https://api.rumahotp.io/v2/countries', {
      params: { service_id: 13 },
      headers: {
        'x-apikey': process.env.RUMAHOTP_API_KEY,
        'accept': 'application/json'
      }
    });
    console.log(JSON.stringify(res.data, null, 2).substring(0, 1000));
  } catch (err: any) {
    console.error(err.response?.data || err.message);
  }
}
test();
