title: Setting cookies in Volley does not work
body: <p>This is the code i use:</p>
  
  <pre><code> if (toEditText.getText().toString().length() &gt; 0) {
                  getName = toEditText.getText().toString().substring(0, toEditText.getText().toString().length() - 1) + "";
                  StringBuffer sb = new StringBuffer();
                  sb.append(Constants.SERVER_IP);
                  sb.append("/api/groups.json");
                  String url = sb.toString();
                  LogService.log(TAG, "download url: " + url);
                  JSONObject juser = new JSONObject();
                  JSONArray userIds = new JSONArray();
                  for (int i = 0; i &lt; user_ids.size(); i++) {
                      userIds.put(user_ids.get(i));
                  }
  
                  try {
                      juser.put("group_name", getName);
                      juser.put("owner_id", UserCredentialsPersistence.getUserId(context));
                      juser.put("user_ids", userIds);
                      juser.put("group_type", null);
                      juser.put("name_protected", true);
                      LogService.log(TAG, "JSON: " + juser.toString());
                  } catch (JSONException e1) {
                      // TODO Auto-generated catch block
                      e1.printStackTrace();
                  }
                  RequestQueue mRequestQueue = Volley.newRequestQueue(getActivity());
                  JsonObjectRequest jr = new JsonObjectRequest(Request.Method.POST, url, juser, new Response.Listener&lt;JSONObject&gt;() {
                      @Override
                      public void onResponse(JSONObject response) {
                          Log.i(TAG, "%%%%%Response:" + response.toString());
                          int group_id = 0;
                          group_name = "";
                          if (response != null) {
                              for (int i = 0; i &lt; response.length(); i++) {
                                  try {
                                      JSONObject userObj2 = (JSONObject) response.get("group");
                                      group_id = userObj2.getInt("id");
                                      group_name = userObj2.getString("name");
                                  } catch (JSONException e) {
                                      // TODO Auto-generated catch block
                                      e.printStackTrace();
                                  }
                              }
                              LogService.log(TAG, "id: " + group_id);
                              LogService.log(TAG, "name: " + group_name);
                              getName = "";
                              toEditText.setText("");
                              GroupAndConversationManager.getInstance(context).addNewConversation(group_id, group_name);
  
                              hideSearchFild();
  
                              int curr_group_id = UserCredentialsPersistence.getCurrentGroupId(context);
  
                              changeGroup(curr_group_id, group_id);
                              showGroupToast(group_name);
                              setVideoPlayback();
  
                          }
                      }
                  }, new Response.ErrorListener() {
                      @Override
                      public void onErrorResponse(VolleyError error) {
                          Log.i(TAG, error.getMessage());
                      }
                  }) {
                      @Override
                      public HashMap&lt;String, String&gt; getParams() {
                          HashMap&lt;String, String&gt; params = new HashMap&lt;String, String&gt;();
                          StringBuilder builder = new StringBuilder();
                          builder.append(UserCredentialsPersistence.restoreCookie(context));
                          params.put("Cookie", builder.toString());
  
                          return params;
                      }
                  };
                  mRequestQueue.add(jr);
  }
  </code></pre>
  
  <p>Now, Logcat gives me back this line: </p>
  
  <pre><code>07-12 11:21:53.702: I/VideoPlayerFragment(27428): java.io.IOException: No authentication challenges found
  </code></pre>
  
  <p>I have also tried to override getHeaders, instead of getParams(), but i get an error, so the webservice does not work correctly. This is from where I've got the ideea to override getParams/getHeaders: <a href="https://stackoverflow.com/questions/17049473/how-to-set-custom-header-in-volley-request">How to set custom header in Volley Request</a>
  Could anyone explain to me what I'm doing wrong?</p>