const http = require('http');

http.get('http://127.0.0.1:8081/api/cattle-market-data', (res) => {
  console.log('StatusCode:', res.statusCode);
  console.log('Headers:', res.headers);

  let data = '';
  res.on('data', (chunk) => {
    data += chunk;
  });

  res.on('end', () => {
    console.log('Body Length:', data.length);
    console.log('Body Preview:', data.substring(0, 500));
  });

}).on('error', (e) => {
  console.error(e);
});