title: BasicNetwork.performRequest: Unexpected response code 400
body: <p>I have a big problem. Normally, i did not receive this error anytime. But now i am receiving. How can solve that problem? I research and i learn i need create custom header with getBodyContentType(). But that is not solving for me..</p>
  
  <pre><code> public void getToken(final Activity activity, final String paramUsername, final String paramPassword) {
  
          String tag_json_obj = "getToken";
  
  
          SharedComponent.pDialog = new ProgressDialog(activity);
          SharedComponent.pDialog.setMessage(context.getString(R.string.controlYourInfo));
          SharedComponent.pDialog.setCancelable(false);
  
          SharedComponent.pDialog.show();
  
  
          JSONObject params = new JSONObject();
          try {
              params.put("username", paramUsername);
              params.put("password", paramPassword);
              params.put("grant_type", "password");
          } catch (JSONException e) {
              e.printStackTrace();
          }
  
  
          JsonObjectRequest jsonObjReq = new JsonObjectRequest(Request.Method.POST,
                  WebUrls.getToken, params,
                  new Response.Listener&lt;JSONObject&gt;() {
  
  
                      @Override
                      public void onResponse(JSONObject response) {
                          //     Log.d(TAG, response.toString());
                          SharedComponent.pDialog.hide();
  
  
                          try {
  
                              if (response.toString().contains("error")) {
  
                                  error = response.getString("error");
                                  error_description = response.getString("error_description");
  
                                  Toast.makeText(context, error_description, Toast.LENGTH_LONG).show();
  
                              } else {
  
                                  access_token = response.getString("access_token");
                                  token_type = response.getString("token_type");
                                  expires_in = response.getInt("expires_in");
  
  
                                  SharedComponent.sharedEditor.putString("TOKEN", "Bearer " + access_token);
                                  SharedComponent.sharedEditor.putString("LOGGED", "LOGGED");
                                  SharedComponent.sharedEditor.commit();
  
                                  Log.e("TOKEN", "Bearer " + access_token);
  
                                  Intent intent = new Intent(activity, MainScreen.class);
                                  context.startActivity(intent);
                                  ((Activity) context).finish();
  
                              }
  
                          } catch (JSONException e) {
                              e.printStackTrace();
                              Toast.makeText(context,
                                      "Error: " + e.getMessage(),
                                      Toast.LENGTH_LONG).show();
                          }
  
  
                      }
                  }, new Response.ErrorListener() {
  
              @Override
              public void onErrorResponse(VolleyError error) {
                  //   VolleyLog.d(TAG, "Error: " + error.getMessage());
                  SharedComponent.pDialog.hide();
  
              }
  
  
          }) {
  
              @Override
              public String getBodyContentType() {
                  return "application/x-www-form-urlencoded";
              }
  
              @Override
              public Map&lt;String, String&gt; getHeaders() throws AuthFailureError {
                  HashMap&lt;String, String&gt; headers = new HashMap&lt;String, String&gt;();
                  headers.put("Accept", "application/json");
                  headers.put("Content-Type", getBodyContentType());
  
                  return headers;
              }
          };
  
  // Adding request to request queue
          AppController.getInstance().addToRequestQueue(jsonObjReq, tag_json_obj);
      }
  </code></pre>