NetBare-Android icon indicating copy to clipboard operation
NetBare-Android copied to clipboard

使用sample 打印respond body 不全,二次回调的body也是第一次里头的部分内容,并不是新的,很奇怪, 是否是我打印body的方法有问题

Open jinmaotowne opened this issue 4 years ago • 6 comments

使用sample 打印respond body 不全,二次回调的body也是第一次里头的部分内容,并不是新的,很奇怪, 是否是我打印body的方法有问题

jinmaotowne avatar May 25 '20 02:05 jinmaotowne

            HttpBodyInputStream his = null;
            Reader reader = null;
            his = new HttpBodyInputStream(body);
            try {
                reader = new InputStreamReader(new GZIPInputStream(his));
            } catch (Exception ex) {
                reader = new InputStreamReader(his);
            }
            BufferedReader in = new BufferedReader(reader);
            StringBuffer buffer = new StringBuffer();
            String line = " ";
            while ((line = in.readLine()) != null) {
                buffer.append(line);
            }

jinmaotowne avatar May 25 '20 03:05 jinmaotowne

我也遇到了這個問題請問要如何解決返回數據過大導致内容不全的問題

wordgege avatar Jun 28 '20 03:06 wordgege

@MegatronKing 請賜教謝謝

wordgege avatar Jun 28 '20 03:06 wordgege

@MegatronKing 請賜教謝謝

包的数据过大的话分成了好几个index,我也奇怪作者为什么这么做

qkmaosjtu avatar Sep 08 '20 08:09 qkmaosjtu

@MegatronKing 請賜教謝謝

包的数据过大的话分成了好几个index,我也奇怪作者为什么这么做

我解决了这个问题 我封装了curl 通过jni调用curl发送请求通过netbare拦截返回数据达到数据修改目的

wordgege avatar Nov 13 '20 19:11 wordgege

same issue,how did i know the response done and get full body?thanks

fr0zenrain avatar May 28 '22 11:05 fr0zenrain