title: How to connect web api via volley in android
body: <p>I have a wep api like bellow </p>
  
  <pre><code>[HttpPost]
          public dynamic GetData(string sp, Dictionary&lt;string, dynamic&gt; dict, string db)
          {
              Dictionary&lt;string, dynamic&gt; defultdr = new Dictionary&lt;string, dynamic&gt;();
              if (dict != null)
              {
                  defultdr = dict;
              }
              System.Data.DataTable dt = DAL.GetDataTableFromStoredProc(sp, defultdr, System.Configuration.ConfigurationManager.
  ConnectionStrings[db].ConnectionString);
  
              return Request.CreateResponse&lt;System.Data.DataTable&gt;(HttpStatusCode.OK, dt);
          }
  </code></pre>
  
  <p>in android 
  Application File</p>
  
  <pre><code>public class Tapplication extends Application {
      private RequestQueue mRequestQueue;
      private static Tapplication mInstance;
      public static final String TAG = Tapplication.class.getSimpleName();
      private static final int MY_SOCKET_TIMEOUT_MS = 120000;
      private static Context mContext;
  
      @Override
  
      public void onCreate() {
          super.onCreate();
  
  
          mInstance = this;
          mContext = getApplicationContext();
  
      }
  
      public static Context getContext() {
          return mContext;
      }
  
      public static synchronized Tapplication getInstance() {
  
          return mInstance;
      }
  
      public RequestQueue getRequestQueue() {
          if (mRequestQueue == null) {
              mRequestQueue = Volley.newRequestQueue(getApplicationContext());
  
          }
  
          return mRequestQueue;
      }
  
      public &lt;T&gt; void addToRequestQueue(Request&lt;T&gt; req, String tag) {
          // set the default tag if tag is empty
          req.setTag(TextUtils.isEmpty(tag) ? TAG : tag);
          getRequestQueue().add(req);
      }
  
      public &lt;T&gt; void addToRequestQueue(Request&lt;T&gt; req) {
  
  //        req.setRetryPolicy(new DefaultRetryPolicy(MY_SOCKET_TIMEOUT_MS, DefaultRetryPolicy.DEFAULT_MAX_RETRIES,
  //                DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));
          req.setTag(TAG);
          getRequestQueue().add(req);
      }
  
      public void cancelPendingRequests(Object tag) {
          if (mRequestQueue != null) {
              mRequestQueue.cancelAll(tag);
          }
      }
  
  }
  </code></pre>
  
  <p>When i am calling</p>
  
  <pre><code>            JSONObject json = new JSONObject();
              Map&lt;String, String&gt; mp = new HashMap();
              mp.put("@id", ((EditText) findViewById(R.id.edt_login_user)).getText().toString());
              mp.put("@pass", ((EditText) findViewById(R.id.edi_login_password)).getText().toString());
              json.put("db", getString(R.string.DB_SCM));
              json.put("sp","test_api");
              json.put("dict", null);
             //json.put("dict", mp);
              Tapplication.getInstance().addToRequestQueue(new JsonObjectRequest(Method.POST, getString(R.string.api_v1_get_data), json, loginListener(), genericErrorListener()));
  </code></pre>
  
  <blockquote>
    <p>E/Volley: [144] BasicNetwork.performRequest: Unexpected response code
    404 for <a href="http://some.webapi.com:8095/api/v1/TService/GetData/" rel="nofollow noreferrer">http://some.webapi.com:8095/api/v1/TService/GetData/</a></p>
  </blockquote>
  
  <p>it is working on <strong>POSTMAN</strong> but it is not working on android.</p>
  
  <p>what to do ? what i am missing</p>