package com.wyh.test;
import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLConnection;
import javax.servlet.http.HttpSession;
import com.wyh.servlet.SelectApi;
public class Api {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
try {
URLConnection conn=new URL("http://api.zb.com/data/v1/kline?market=btc_usdt").openConnection();
InputStream stream=conn.getInputStream();
conn.connect();
BufferedReader reader=new BufferedReader(new InputStreamReader(stream, "UTF-8"));
System.out.println(reader.readLine());
} catch (Exception e) {
e.printStackTrace();
}
}
}