const http = require('http');

function testMarketDetail() {
  console.log('测试获取品种详情...');
  
  const options = {
    hostname: 'localhost',
    port: 3007,
    path: '/api/market/detail/AU',
    method: 'GET'
  };
  
  const req = http.request(options, (res) => {
    console.log(`状态码: ${res.statusCode}`);
    res.setEncoding('utf8');
    let data = '';
    res.on('data', (chunk) => {
      data += chunk;
    });
    res.on('end', () => {
      console.log('响应数据:', data);
    });
  });
  
  req.on('error', (e) => {
    console.error(`请求失败: ${e.message}`);
  });
  
  req.end();
}

testMarketDetail();