java如何调用http接口

1.

import java.net.*;import java.io.*;

public class URLReader { public static void main(String[] args) throws Exception {URL yahoo = new URL("http://www.baidu.com/query.jsp?param1=value2&param2=value2");BufferedReader in = new BufferedReader(new InputStreamReader(yahoo.openStream()));

String inputLine;

while ((inputLine = in.readLine()) != null) System.out.println(inputLine);

in.close(); }}

2.

DOM4J的工具,来解析读取到的 xml格式的数据

击败不等于击倒,跌倒了,爬起来,想一想,为什么跌倒了,

java如何调用http接口

相关文章:

你感兴趣的文章:

标签云: