0

七牛云调用OCR身份证识别接口,Authorization: Qiniu <AccessKey>:<Sign>生成方法

Auth auth = Auth.create(acKey, scKey);
        String signature = auth.signRequestV2("http://ai.qiniuapi.com/v1/ocr/idcard?uri=http://img3.redocn.com/20120528/Redocn_2012052817213559.jpg",
                "POST", null, "application/json");
        String QiniuToken = "Qiniu " + signature;
        Map<String, String> headers = new HashMap<>();
        headers.put("Authorization", QiniuToken);
        String result = HttpKit.post("http://ai.qiniuapi.com/v1/ocr/idcard?uri=http://img3.redocn.com/20120528/Redocn_2012052817213559.jpg", null, "UTF-8", headers);
        System.out.println(result);`

clipboard.png

2018-11-02 提问
0 个回答

撰写答案

你可能感兴趣的

推广链接