当前位置: 首页 > 知识库问答 >
问题:

branch.io API在创建时引发不支持SSLException的记录版本未知-0.0

王伯寅
2023-03-14

相关代码如下所示:

            HttpURLConnection conn = (HttpURLConnection) new URL("https://api.branch.io/v1/url").openConnection();
 conn.setDoOutput(true);
            conn.setUseCaches(false);
            conn.setFixedLengthStreamingMode(bytes.length);
            conn.setRequestMethod("POST");

            conn.setRequestProperty("Content-Type", "application/json");
            out = conn.getOutputStream();

            out.write(bytes);
            in = conn.getInputStream();

            BufferedReader reader =new BufferedReader(new InputStreamReader(in));

暂时还没有答案

 类似资料: