title: Android Communicate with wit.ai
body: <p><strong>I am trying to establish connection with wit</strong>.AI using Volley . However, all i am getting is a <strong>400 error</strong>.</p>
  
  <pre><code>public void makeRequest(String url) {
      RequestQueue queue = Volley.newRequestQueue(MainActivity.this);
      StringRequest postRequest = new StringRequest(Request.Method.POST, url, new Response.Listener&lt;String&gt;() {
          @Override
          public void onResponse(String response) {
              Toast.makeText(MainActivity.this, "YOU'RE TOAST", Toast.LENGTH_SHORT).show();
              Log.d("accessToken:", response);
          }
      }, new Response.ErrorListener() {
          @Override
          public void onErrorResponse(VolleyError volleyError) {
              Log.d("error:", volleyError.toString());
  
          }
      }) {
          @Override
          public Map&lt;String, String&gt; getHeaders() throws AuthFailureError {
              Map&lt;String, String&gt; headers = new HashMap&lt;String, String&gt;();
              headers.put("Authorization:", "Bearer SAMPLETOKENHERE");
              return headers;
          }
  
      };
      queue.add(postRequest);
  }
  </code></pre>