博客
关于我
认知智能机器人已经来了!认知智能时代!道翰天琼认知智能未来机器人接口API简介介绍
阅读量:185 次
发布时间:2019-02-28

本文共 3185 字,大约阅读时间需要 10 分钟。

?????????????????60???chatbot?????????????????????????????????20??60???90????chatbot????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????

?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????

  • ???????????????
  • ?????????????????
  • ???????????????????
  • ??????????????????????????
  • ?????????????????????????

  • ????????????????????????????????????????HNC???????
  • ??????????????????????????????????????
  • ??????????????????????????????????????????
  • ??????????????????????????????
  • ????????????????????????????????????

    ?????????

    ???????????????????????

  • ??APIKEY??????????????????????APIKEY?
  • ?????IP?????????????????IP???????????QQ???
  • ???????????????GBK????????????
  • ?????????????????APIKEY?????????IP??????URL???
  • ??????

    ???????Java????????????

    import java.io.ByteArrayOutputStream;import java.io.IOException;import java.io.InputStream;import java.io.UnsupportedEncodingException;import java.net.HttpURLConnection;import java.net.URL;import java.net.URLEncoder;import ai.nlp.jiekou.test.ChangLiangZi;public class ApiTest {    private static String opUrl(String urlStr) {        try {            URL url = new URL(urlStr);            HttpURLConnection conn = (HttpURLConnection) url.openConnection();            conn.setReadTimeout(5 * 10000);            conn.setConnectTimeout(5 * 10000);            conn.setRequestMethod("POST");                        if (conn.getResponseCode() == 200) {                InputStream is = conn.getInputStream();                ByteArrayOutputStream baos = new ByteArrayOutputStream();                byte[] buf = new byte[128];                int len = -1;                                while ((len = is.read(buf)) != -1) {                    baos.write(buf, 0, len);                }                baos.flush();                return baos.toString();            } else {                throw new Exception("????????");            }        } catch (Exception e) {            e.printStackTrace();        } finally {            try {                if (is != null) {                    is.close();                }                try {                    if (baos != null) {                        baos.close();                    }                } catch (IOException e) {                    e.printStackTrace();                }                conn.disconnect();            } catch (IOException e) {                e.printStackTrace();            }        }        return ChangLiangZi.WU;    }    public static void main(String[] args) {        String msg = "??????";        String apikey = "UTNJK34THXK010T566ZI39VES50BLRBE8R66H5R3FOAO84J3BV";        String ip = "127.0.0.1";        try {            msg = URLEncoder.encode(msg, "GBK");            System.out.println(opUrl("http://a239p06512.zicp.vip/Web/BuAppJava.bujqrex?apikey=" + apikey + "&msg=" + msg + "&ip=" + ip));        } catch (UnsupportedEncodingException e) {            e.printStackTrace();        }    }}

    ????

  • ???????????????????
  • ??????????????GBK?????????????
  • IP?????????IP??????????
  • ??????????POST?????
  • ???????????????????????????????????????

    转载地址:http://nuwn.baihongyu.com/

    你可能感兴趣的文章
    Nacos配置中心集群原理及源码分析
    查看>>
    nacos配置自动刷新源码解析
    查看>>
    Nacos集群搭建
    查看>>
    nacos集群搭建
    查看>>
    Navicat for MySQL 查看BLOB字段内容
    查看>>
    Neo4j电影关系图Cypher
    查看>>
    Neo4j的安装与使用
    查看>>
    Neo4j(2):环境搭建
    查看>>
    Neo私链
    查看>>
    nessus快速安装使用指南(非常详细)零基础入门到精通,收藏这一篇就够了
    查看>>
    Nessus漏洞扫描教程之配置Nessus
    查看>>
    Nest.js 6.0.0 正式版发布,基于 TypeScript 的 Node.js 框架
    查看>>
    NetApp凭借领先的混合云数据与服务把握数字化转型机遇
    查看>>
    NetBeans IDE8.0需要JDK1.7及以上版本
    查看>>
    netcat的端口转发功能的实现
    查看>>
    netfilter应用场景
    查看>>
    netlink2.6.32内核实现源码
    查看>>
    Netpas:不一样的SD-WAN+ 保障网络通讯品质
    查看>>
    NetScaler的常用配置
    查看>>
    netsh advfirewall
    查看>>