title: How to send Post request using Volley in Android?
body: <p>I am sending a volley request like this </p>
  
  <pre><code>  btnSignUp.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View view) {
  
  
              //submitForm();
              JsonObjectRequest jsonobjectRequest = new JsonObjectRequest(Request.Method.POST, URL, null, new Response.Listener&lt;JSONObject&gt;() {
  
                  @Override
                  public void onResponse(JSONObject response) {
                      //errorlabel.setText(response.toString());
                  }
              }, new Response.ErrorListener() {
                  @Override
                  public void onErrorResponse(VolleyError error) {
  
                      errorlabel.setText("Invalid username / password");
                  }
  
              }){
                  @Override
                  protected Map&lt;String, String&gt; getParams() throws AuthFailureError {
                      Map&lt;String, String&gt; params = new HashMap&lt;String, String&gt;();
                      params.put("email", "asd@asd.com");
                      params.put("password", "asd");
  
  
  
                      return params;
                  }
              };
              errorlabel.setText(jsonobjectRequest.toString());
              requestQueue.add(jsonobjectRequest);
  
          }
      });
  
  
  
  
  }
  </code></pre>
  
  <p>But I get an error message from the server saying invalid email/password.</p>
  
  <p>I have set up the correct params. I tested it out on Postman and it works in there. Here is a screenshot. </p>
  
  <p>Screenshot</p>
  
  <p><a href="https://i.stack.imgur.com/tgW7u.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tgW7u.png" alt="enter image description here"></a></p>