请求一个地址得到的响应是乱码。

http://api.helper.qq.com/search/getresultbytype

这个地址是我抓包王者荣耀战绩查询得到的地址。

附上相关代码。

     public static void main(String[] args) throws IOException {
        OkHttpClient okHttpClient = new OkHttpClient();
        String url = "http://api.helper.qq.com/search/getresultbytype";
        Request request = new Request.Builder()
                .url(url)
                .addHeader("Accept-Encoding", "gzip")
                .build();
        Response response = okHttpClient.newCall(request).execute();
        GzipSource responseBody = new GzipSource(response.body().source());
        BufferedSource bufferedSource = Okio.buffer(responseBody);
        String read = bufferedSource.readUtf8();
        System.out.println(read);
//        System.out.println(response.body().string());
    }

看响应 Content-Encoding:gzip 有 GZIP,就算用手动解压或者自动解压,都发现结果是一样的。
我怀疑是被加密后的数据,所以想问问有没有人有类似的经验帮忙解答,万分感谢。

明显header中没有传跟用户相关的信息。肯定得不到数据。

这个乱码应该是干扰。因为查询一个战绩,需要登录QQ,绑定大区,绑定角色才可以