title: Volley Server error this site requires java script enabled
body: <p>I am using volley to send web service request and volley response is SERVER ERROR (this site requires java script enabled). I tried POST and GET methods.
  After some search on this issue I found these two questions..
  <a href="https://stackoverflow.com/questions/35975101/volley-server-error-requires-javascript-android-development">Volley Server error (Requires javascript?) Android Development but there is no answer to solve this issue in 2 months</a></p>
  
  <p><a href="https://stackoverflow.com/questions/33376906/disable-javascript-on-volley-stringrequest">Disable Javascript on volley StringRequest but there is no answer to solve this issue in 6 months</a></p>
  
  <p>No more questions and solution found. Can anyone tell the exact problem and solution with this issue.
  Here is my code</p>
  
  <pre><code>public void postRequest(final JSONObject jsonParams,final Handler handler){
      StringRequest stringRequest = new StringRequest(Request.Method.POST, AppConstants.ADMIN_URL,
              new Response.Listener&lt;String&gt;() {
                  @Override
                  public void onResponse(String response) {
                      Message message = handler.obtainMessage();
                      message.obj = response;
                      handler.sendMessage(message);
                  }
              },
              new Response.ErrorListener() {
                  @Override
                  public void onErrorResponse(VolleyError error) {
                      Message message = handler.obtainMessage();
                      message.obj = error.toString();
                      Log.d("error",error.toString());
                      handler.sendMessage(message);
                  }
              }){
          @Override
          protected Map&lt;String,String&gt; getParams(){
              Map&lt;String,String&gt; params = new HashMap&lt;String, String&gt;();
  
              Iterator&lt;String&gt; iter = jsonParams.keys();
              while (iter.hasNext()) {
                  try {
                      String key = iter.next();
                      String value = jsonParams.get(key)+"";
                      params.put(key,value);
  
                  } catch (JSONException e) {
                      // Something went wrong!
                      Message message = handler.obtainMessage();
                      message.obj = e.getMessage();
                      handler.sendMessage(message);
                  }
              }
              return params;
          }
  
          @Override
          public Map&lt;String, String&gt; getHeaders() throws AuthFailureError {
              Map&lt;String,String&gt; headers = new HashMap&lt;String, String&gt;();
              return headers;
          }
      };
  
      MyVolley.getInstance(context).getRequestQueue().add(stringRequest);
  }
  </code></pre>
  
  <p>and web service code is</p>
  
  <pre><code>&lt;?php if(true) { echo 'request arrived'; } ?&gt;
  </code></pre>