title: Volley :Post request is not working : Error Unexpected Response code 404
body: <p>Trying to register user but getting error Unexpected response code 404, while the URL is correct , parameters are also correct , I've tested it on POSTMAN and it's working fine, but when I am trying to make a request it gives :</p>
  
  <blockquote>
    <p>E/Volley: [19358] BasicNetwork.performRequest: Unexpected response code 404 for GIVEN URL</p>
  </blockquote>
  
  <p>It seems the parameter is not attaching with the URL, but I also made a custom request but that also doesn't work, please help with it.</p>
  
  <p><strong>Note:</strong> the only header is  "<code>application/x-www-form-urlencoded</code>";</p>
  
  <pre><code> private void registerUser()
                  {
  StringRequest stringRequest = new StringRequest(Request.Method.POST, APIReference.USER_REGISTRATION_URL, new Response.Listener&lt;String&gt;() {
                          @Override
                          public void onResponse(String response) {
                              try {
                                  JSONObject jsonObject = new JSONObject(response);
                                  Toast.makeText(mContext,jsonObject.getString("status"),Toast.LENGTH_LONG).show();
                                  showSnackbar(jsonObject.getString("status"));
  
                                  JSONObject object = jsonObject.getJSONObject("response");
                                  User user = new User(object.getString("user_id"),
                                          object.getString("user_name"),
                                          object.getString("user_email"),
                              object.getString("user_phone_no"));
  
                  Toast.makeText(mContext,String.valueOf(jsonObject.getJSONObject("response")),Toast.LENGTH_LONG).show();
  
              } catch (JSONException e) {
                  e.printStackTrace();
              }
  
          }
      }, new Response.ErrorListener() {
          @Override
          public void onErrorResponse(VolleyError error) {
              Log.d("response error : ", String.valueOf(error));
              showSnackbar(String.valueOf(error));
           }
      })
      {
          @Override
          protected Map&lt;String, String&gt; getParams() throws AuthFailureError {
              Map&lt;String, String&gt; params = new HashMap&lt;&gt;();
              params.put("user_name", mUserName);
              params.put("user_email", mUserEmail);
              params.put("user_password", mUserPassword);
              params.put("user_phone_no", mUserMobileNo);
              return params;
          }
  
          @Override
          public Map&lt;String, String&gt; getHeaders() throws AuthFailureError {
              Map&lt;String, String&gt; params = new HashMap&lt;&gt;();
              params.put("Content-Type", "application/x-www-form-urlencoded,charset=utf-8");
              return params;
          }
  
          @Override
          public String getBodyContentType() {
              return "application/x-www-form-urlencoded,charset=utf-8";
          }
      };
      VolleySingleton.getInstance(mContext).getRequestQueue().add(stringRequest);
  }
  </code></pre>