博客
关于我
认知智能机器人已经来了!认知智能时代!道翰天琼认知智能未来机器人接口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/

    你可能感兴趣的文章
    Nginx 学习总结(17)—— 8 个免费开源 Nginx 管理系统,轻松管理 Nginx 站点配置
    查看>>
    Nginx 常用配置清单
    查看>>
    nginx 常用配置记录
    查看>>
    Nginx 我们必须知道的那些事
    查看>>
    Nginx 的 proxy_pass 使用简介
    查看>>
    Nginx 的配置文件中的 keepalive 介绍
    查看>>
    Nginx 负载均衡与权重配置解析
    查看>>
    Nginx 负载均衡详解
    查看>>
    nginx 配置 单页面应用的解决方案
    查看>>
    nginx 配置https(一)—— 自签名证书
    查看>>
    nginx 配置~~~本身就是一个静态资源的服务器
    查看>>
    Nginx 配置解析:从基础到高级应用指南
    查看>>
    nginx+Tomcat性能监控
    查看>>
    Nginx下配置codeigniter框架方法
    查看>>
    nginx报错:the “ssl“ parameter requires ngx_http_ssl_module in /usr/local/nginx/conf/nginx.conf:128
    查看>>
    nginx添加模块与https支持
    查看>>
    Nginx用户认证
    查看>>
    Nginx的Rewrite正则表达式,匹配非某单词
    查看>>
    Nginx的使用总结(一)
    查看>>
    Nginx的使用总结(二)
    查看>>