title: Getting Failure response after a successful post on Retrofit
body: <pre><code>05-09 08:59:33.258 14174-14247/com.example.ga.retrofitposttest D/OkHttp: --&gt; POST http://DOMAINHIDDEN.com/solicitation/create?X-Authorization=dda15b84304fe58cbcc4f6570363 http/1.1
  05-09 08:59:33.258 14174-14247/com.example.ga.retrofitposttest D/OkHttp: Content-Type: application/json; charset=UTF-8
  05-09 08:59:33.258 14174-14247/com.example.ga.retrofitposttest D/OkHttp: Content-Length: 183
  05-09 08:59:33.259 14174-14247/com.example.ga.retrofitposttest D/OkHttp: {"description":"descript22222222ion goes here","file":"file goes here","geolat":"31","geolong":"32","location":"list","protocol":"203120312","type":"2xx","userid":"use2rid goes here"}
  05-09 08:59:33.259 14174-14247/com.example.ga.retrofitposttest D/OkHttp: --&gt; END POST (183-byte body)
  05-09 08:59:33.267 14174-14248/com.example.ga.retrofitposttest D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
  05-09 08:59:33.319 14174-14248/com.example.ga.retrofitposttest I/Adreno-EGL: &lt;qeglDrvAPI_eglInitialize:379&gt;: QUALCOMM Build: 10/21/15, 369a2ea, I96aee987eb
  05-09 08:59:33.322 14174-14248/com.example.ga.retrofitposttest I/OpenGLRenderer: Initialized EGL, version 1.4
  05-09 08:59:33.416 14174-14174/com.example.ga.retrofitposttest W/art: Before Android 4.1, method int android.support.v7.widget.ListViewCompat.lookForSelectablePosition(int, boolean) would have incorrectly overridden the package-private method in android.widget.ListView
  05-09 08:59:33.646 14174-14247/com.example.ga.retrofitposttest D/OkHttp: &lt;-- 200 OK http://DOMAINHIDDEN.com/solicitation/create?X-Authorization=dda15b84304fe58cbcc4f6570363 (386ms)
  05-09 08:59:33.646 14174-14247/com.example.ga.retrofitposttest D/OkHttp: Date: Tue, 09 May 2017 11:59:34 GMT
  05-09 08:59:33.646 14174-14247/com.example.ga.retrofitposttest D/OkHttp: Server: Apache/2.4.18 (Ubuntu)
  05-09 08:59:33.646 14174-14247/com.example.ga.retrofitposttest D/OkHttp: Access-Control-Allow-Origin: *
  05-09 08:59:33.646 14174-14247/com.example.ga.retrofitposttest D/OkHttp: Access-Control-Allow-Methods: GET, POST, OPTIONS
  05-09 08:59:33.646 14174-14247/com.example.ga.retrofitposttest D/OkHttp: Access-Control-Allow-Headers: Origin, Content-Type, Accept, Authorization, X-Request-With
  05-09 08:59:33.646 14174-14247/com.example.ga.retrofitposttest D/OkHttp: Access-Control-Allow-Credentials: true
  05-09 08:59:33.646 14174-14247/com.example.ga.retrofitposttest D/OkHttp: Cache-Control: no-cache
  05-09 08:59:33.647 14174-14247/com.example.ga.retrofitposttest D/OkHttp: Set-Cookie: XSRF-TOKEN=eyJpdiI6ImM3XC9KSE8yMVh0ZGpZWEt0UUNFTmd3PT0iLCJ2YWx1ZSI6IitQSjZhallLekdaKzNLTDFZZFQ1ZFBXOG5IbUNCM1duUFpMS3ZvV0hUdVJQeUdqTzdlQTNJakk3ODlGOVo4YzNRWXJrT2tZVEMxT3VkcnhuMHZVY013PT0iLCJtYWMiOiI3YTlhMDlmNTMwY2ZjYzk0YjFhN2UzNWE5OGVjYzEwYWQ2YjllMGQyZjUxODM0Y2VkZjU4NmI3YjUyNDM0OTEwIn0%3D; expires=Tue, 09-May-2017 13:59:34 GMT; Max-Age=7200; path=/
  05-09 08:59:33.647 14174-14247/com.example.ga.retrofitposttest D/OkHttp: Set-Cookie: laravel_session=eyJpdiI6InJXM0s5c1NDbnF2M1BlZXNTa0pqalE9PSIsInZhbHVlIjoiV3Eyc1hST3kxRzdoTEVFajBzdSs4emZcL0ZvXC9TMVNBUUZucnB2VDNcL3ozZkc1cjBvR042RmlhZDRMSGtIcDZtWk44V1o0T3V4TE1uREFQdlVyWFJHZVE9PSIsIm1hYyI6IjRiMWNhYzQ2MTg5MGViN2RiN2I3YTVlMWQxN2M5YzNjODQ0ODJmYmIwNjg5NzM3ZGUwNGM3NDhmZDEyMTk5YjQifQ%3D%3D; expires=Tue, 09-May-2017 13:59:34 GMT; Max-Age=7200; path=/; HttpOnly
  05-09 08:59:33.647 14174-14247/com.example.ga.retrofitposttest D/OkHttp: Content-Length: 0
  05-09 08:59:33.647 14174-14247/com.example.ga.retrofitposttest D/OkHttp: Keep-Alive: timeout=5, max=100
  05-09 08:59:33.647 14174-14247/com.example.ga.retrofitposttest D/OkHttp: Connection: Keep-Alive
  05-09 08:59:33.647 14174-14247/com.example.ga.retrofitposttest D/OkHttp: Content-Type: text/html; charset=UTF-8
  05-09 08:59:33.647 14174-14247/com.example.ga.retrofitposttest D/OkHttp: &lt;-- END HTTP (0-byte body)
  </code></pre>
  
  <p>As you can see above, I get <code>OkHttp: &lt;-- 200 OK</code>.</p>
  
  <p>If I'm getting a 200 OK, why the heck the callback response coming back through <code>onFaiure</code>.</p>
  
  <h1>Edit Code Below</h1>
  
  <pre><code>    Solicitation solicitation = new Solicitation("2xx", "list", "31", "32", "descript22222222ion goes here", "file goes here", "use2rid goes here", "203120312");
  
      ApiInterface apiService = ApiClient.getClient().create(ApiInterface.class);
  
      Call&lt;Solicitation&gt; call = apiService.createSolicitation(API_KEY, solicitation);
      call.enqueue(new Callback&lt;Solicitation&gt;() {
          @Override
          public void onResponse(Call&lt;Solicitation&gt; call, Response&lt;Solicitation&gt; response) {
              Log.d("Response::", "Success!");
          }
  
          @Override
          public void onFailure(Call&lt;Solicitation&gt; call, Throwable t) {
              Log.e("Response::", "Fail!!");
          }
      });
  </code></pre>
  
  <p>The above code is placed onCreate method just for testing. ApiInterface has 2 methods, one to retrieve and one to create, I'm using the create method above. It works, but it still returns failure nonetheless.</p>
  
  <p>The final line of the log goes like this:</p>
  
  <pre><code>05-09 08:59:33.663 14174-14174/com.example.ga.retrofitposttest E/Response::: Fail!!
  </code></pre>
  
  <p>Which is precisely what I coded in <code>onFailure</code>.</p>