Java 从android连接到HMAC RESTful api

Java 从android连接到HMAC RESTful api,java,android,api,rest,android-volley,Java,Android,Api,Rest,Android Volley,我需要帮助才能连接到此api 这是一份文件: 该网站的例子是在php,我不明白 我有公钥和私钥 我试过截击 // Instantiate the RequestQueue. RequestQueue queue = Volley.newRequestQueue(this); String url ="http://www.jazzradio.fr/api/news"; // Request a string response from

我需要帮助才能连接到此api

这是一份文件:

该网站的例子是在php,我不明白

我有公钥和私钥

我试过截击

    // Instantiate the RequestQueue.
            RequestQueue queue = Volley.newRequestQueue(this);
            String url ="http://www.jazzradio.fr/api/news";

// Request a string response from the provided URL.
            StringRequest stringRequest = new StringRequest(Request.Method.GET, url,
                    new Response.Listener<String>() {
                        @Override
                        public void onResponse(String response) {
                            // Display the first 500 characters of the response string.
                            tx.setText("Response is: "+ response.toString());
                        }
                    }, new Response.ErrorListener() {
                @Override
                public void onErrorResponse(VolleyError error) {
                    tx.setText("That didn't work!");
                }
            });
// Add the request to the RequestQueue.
            queue.add(stringRequest);

如何发送公钥和私钥以获得授权

看起来您应该覆盖getHeaders,其中设置了“X-public-key”和“X-Request-Hash”(由密钥生成)。要生成哈希,请尝试以下链接,看起来您应该覆盖getHeaders,其中设置了“X-public-key”和“X-Request-Hash”(由您的密钥生成)。若要生成哈希,请尝试以下链接和
{"error":{"code":401,"title":"Unauthorized #0"}}