2、tpURLConnection;import java.net.URL;import java.net.URLEncoder;import java.util.HashMap;import java.util.Map; import net.sf.json.JSONObject; /***成语词典调用示例代码 - 聚合数据*在线接口文档:http://www.juhe.cn/docs/157**/ public class JuheDemo { public static final String DEF_CHAT
3、SET = "UTF-8"; public static final int DEF_CONN_TIMEOUT = 30000; public static final int DEF_READ_TIMEOUT = 30000; public static String userAgent = "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.66 Safari/537.36";
4、 //配置您申请的KEY public static final String APPKEY ="*************************"; //1.根据成语查询详细信息 public static void getRequest1(){ String result =null; String url ="http://v.juhe.cn/chengyu/query";//请求接口地址 Map params = new HashMap();/